“In Rama was there a voice heard, lamentation, and weeping, and great mourning, Rachel weeping for her children, and would not be comforted, because they are not. (Matt 2:18)”
Problem: Matthew quotes Jeremiah 31:15 to refer to the death of the babies in Bethlehem. But Jeremiah was writing (in context) about the children killed during the Babylonian exile 600 years earlier. Was Matthew quoting this out of context?
Solution: At the time that Jeremiah was writing, Rachel had been dead for over a millennium. Thus we should ask, “Was Jeremiah referring to Rachel out of context? Didn’t he know that Rachel had been dead for centuries?”
Of course Jeremiah knew this. In fact, he was making a reference to Rachel, because she was buried in this particular area—near Bethlehem to the south (Gen. 48:7). The city of Ramah was five miles north of Jerusalem, “the very place where exiles were gathered before deportation to Babylon (cf. 40:1).” So, when the Jewish captives were taken into the exile, they were taken through Ramah—near the place where Rachel was buried. Therefore, when the children of Israel were being deported, Rachel was “turning in her grave” over the tragedy.
Imagine a race riot occurring near the grave of Martin Luther King Jr. If a number of African Americans were killed during the riot, a newspaper headline might read: “MLK WEEPS OVER THE RACE RIOT IN WASHINGTON D.C.” Of course, this would be figurative language, because MLK has been dead for decades. But the reader would understand the point. Similarly, Jeremiah was using Rachel metaphorically to describe the tragedy of the exile. Because of Jeremiah’s mention of Rachel, Carson notes, “In later rabbinic literature, Rachel becomes a consummate mourner.”
So, why does Matthew cite this passage to refer to Jesus? He must have this similar motif in mind. As Herod kills the babies in Bethlehem (the actual site of Rachel’s burial), Matthew must be seeing an even closer parallel than Jeremiah. That is, if Rachel was mourning for the children in Ramah (ten miles to the north), then how much more would she weep for the children dying in Bethlehem (where she was actually buried). Later, Jesus was confused by the people to be the prophet Jeremiah (Mt. 16:14), so something about Jesus’ travels to Egypt might also parallel Jeremiah (Jer. 43-44). Carson writes, “[Matthew] may also see Jesus as a new and greater Jeremiah (i.e., a suffering prophet, who also spent time in Egypt [Jer. 43–44].”
 Feinberg, C. L. Jeremiah. In F. E. Gaebelein (Ed.), The Expositor’s Bible Commentary, Volume 6: Isaiah, Jeremiah, Lamentations, Ezekiel (F. E. Gaebelein, Ed.). Grand Rapids, MI: Zondervan Publishing House. 1986. 569.
 Beale, G. K., & Carson, D. A. (2007). Commentary on the New Testament use of the Old Testament (9). Grand Rapids, MI; Nottingham, UK: Baker Academic; Apollos.
 Beale, G. K., & Carson, D. A. (2007). Commentary on the New Testament use of the Old Testament (10). Grand Rapids, MI; Nottingham, UK: Baker Academic; Apollos.