What the text says. Warned in a dream, Joseph takes the child to Egypt (Matthew 2:13-18). Herod, Matthew 2:16 (ASV) says, "when he saw that he was mocked of the Wise-men, was exceeding wroth", and kills the boys of Bethlehem two years old and under.
What was going on. The killing is in character for the Herod that Josephus, a Jewish historian writing for a Roman audience, no friend of Christian claims, describes at length. Herod had his wife Mariamne executed, and her mother Alexandra after her. He had his own sons Alexander and Aristobulus strangled at Sebaste on a charge of conspiracy, and his eldest son Antipater put to death five days before his own death. Josephus reports that as he lay dying at Jericho he ordered the leading men of the nation to be shut in the hippodrome and killed the moment he died, so that the country would mourn at his funeral whether or not it mourned for him, an order that was not carried out (Antiquities 16-17; Wars 1). Augustus' reported quip that it was safer to be Herod's pig than his son is preserved by the later writer Macrobius and is not contemporary evidence, but the executions themselves are Josephus'.
The honest caveat. Josephus does not record the killing of the children at Bethlehem. Sceptical scholars take that silence as evidence the episode is not historical. Others answer that Bethlehem was a small village, that the number of male infants under two would have been very small, plausibly a dozen or fewer, and that such an act would scarcely have registered beside the executions Josephus does report at length. The silence is a real fact and the explanations for it are arguments; this file records both and adjudicates neither. What the record does establish is the narrower point: a ruler capable of the order Matthew describes is the ruler the independent sources describe.
Sources: Matthew 2:13-18; Josephus, Antiquities 16.11 and 17.6-8, Wars 1.27-33; ISBE 1915, "Innocents, Massacre of the" and "Herod"; Schürer, Div. 1 Vol. 1, "Herod the Great".
---