I [God] will raise up for them a prophet like you [Moses] from among their own people; I will put my words in the mouth of the prophet, who shall speak to them everything that I command. (Deut 18:18 | NRSV; square brackets added for clarification)
This text has been appealed to by many Muslim apologists as a prophecy of Muhammad. This is one of the more popular "go-to" texts from the Old Testament Muslim apologists appeal to (another one would be Song of Solomon 5:16). However, there are numerous exegetical difficulties with such a perspective taken by Shabir Ally and other Muslim apologists. As liberal New Testament scholar, Robert Miller, wrote:
The consensus among biblical scholars is that this prophecy promises a line of prophets after Moses, for the context (Deut 18:19-22) clearly presupposes multiple prophets. The prophecy is thus an assurance that every generation in Israel will have the benefit of prophetic guidance. In the Hellenistic period, when many Jews perceived that God had stopped sending prophets to Israel, the prophecy in Deut 18:18 was reinterpreted eschatologically, as a promise that one ideal prophet would arise in the Last Days. Christians, naturally, applied this prophecy to Jesus (e.g., in Acts 3:22).
A biblical prophecy about a coming prophet-like-Moses would attract the interest of Muslims, for the Quran often describes Muhammad as completing the prophetic revelations given to Moses and Jesus . . . [according to Muslim apologists] Muhammad fulfilled this prophecy because he was a descendant of Ishmael, the brother of Isaac. However, this reading of "brothers" defies the sense of the passage and the use of that term elsewhere in Deuteronomy. The prophecy says that God will raise up a prophet "for them," that is, for the people of Israel. How would a foreign prophecy, even one from a related people (such as the Arabs), be construed as having a mission for Israel? Furthermore, Deut 17:15 ordains that when the Israelites choose their king, he must be "from among your brothers," (i.e., from among the Israelites), which is explicitly reinforced by "not a foreigner."
Deut 18:18 predicts that the prophet(s) to come will be "like Moses." In the context of Deuteronomy, a prophet "like Moses" means simply a prophet that is appointed by God rather than self-appointed; see Deut 18:20-22, which explains how to tell if a prophet is truly sent by God. Nasir and Badawi both impute very specific meanings to "like Moses," meanings that enable them to interpret this detail so that it points to Muhammad but excludes Jesus. Nasir asserts that "like Moses" means that the prophet will govern a new nation and promulgate "a new Law . . . to replace an old one." Since Jesus denied replacing the Law of Moses (Matt 5:17-18), and since the Quran claims to be a guide for the righteous (Quran 2:3), the prophecy in Deuteronomy points to Muhammad, not Jesus. Badawi goes much further than Nasir, and arranges a series of comparisons that demonstrate, not only that Muhammad and Moses were "very much alike in many respects," but also that the "Prophet Jesus does not fit this particular prophecy." Badawi points out, for example, that Muhammad and Moses were born naturally, were married and had children, died of natural causes, were "heads of states," were forced to flee as adults to escape plots to kill them, defeated enemy armies sent to destroy them, and have "comprehensive codes of law." Jesus shared none of these similarities with Moses.
In asserting this argument, we start with the observation that any two individuals are like each other in some respects and unlike each other in other respects. In his comparisons of Moses to Muhammad and then to Jesus, Badawi selects criteria that allow him to draw the preordained conclusion, ignoring the ways in which Muhammad is unlike Moses. A different set of comparisons could be devised that leads to an opposite result. For example, Moses and Jesus were rescued as infants from a mass murder of baby boys ordered by a king; Moses and Jesus worked miracles; Moses and Jesus chose those who would inherit their authority. Muhammad shares none of those similarities with Moses. Whether Jesus or Muhammad (or Jeremiah, for that matter) is more like Moses is not an objective judgment based on neutral criteria.
The remaining element of Deut 18:18 is, "I will put my words into his mouth, and he will speak to them everything that I command." Badawi acknowledges that his description fits any messenger of God. He therefore does not argue that Jesus did not fulfill this aspect of the prophecy. Instead, he argues that Muhammad fulfilled it par excellence. Nasir takes a different tack, arguing that the description does not apply to Jesus. "Strange as it may seem, there is not a single example of words which Jesus may be said to have received from God with the command to pass them on." When put in this strict form, Nasir's comment is true: the gospels nowhere depict Jesus prefacing his teaching with "Thus says the Lord," as it is the custom for the OT prophets. But then Nasir overplays his hand, pointing out that "Jesus did not claim to be a prophet," citing Matt 16:13-16, in which Nasir believes that "Jesus denied being either John the Baptist or Elias or one of the prophets." This misinterprets the Matthean passage, which reports only that Jesus did not acknowledge being a prophet from the past come back to life. Furthermore, Nasir's implication that Jesus was not a prophet is bizarre for a Muslim to make because Islam reveres Jesus as a great prophet. (Robert J. Miller, Helping Jesus Fulfill Prophecy [Eugene, Oreg.: Cascade Books, 2016], locations 9005-9043 in the kindle edition)