King Herod wanted to kill Jesus when he was a baby because he was threatened by the prophecy that a new king, the Messiah, would be born in Bethlehem. Herod ordered the massacre of all male infants in Bethlehem to eliminate any competition to his throne, hoping to find and kill Jesus among them. However, an angel warned Joseph and Mary to flee to Egypt with the baby Jesus, and they escaped Herod's wrath.