Another answer from our community::
The sad end of this great man of God is told in the following verses (Matthew 14:1-12): At that time Herod the tetrarch heard of the fame of Jesus,
2And said unto his servants, This is John the Baptist; he is risen from the dead; and therefore mighty works do shew forth themselves in him. 3For Herod had laid hold on John, and bound him, and put him in prison for Herodias' sake, his brother Philip's wife. 4For John said unto him, It is not lawful for thee to have her. 5And when he would have put him to death, he feared the multitude, because they counted him as a prophet. 6But when Herod's birthday was kept, the daughter of Herodias danced before them, and pleased Herod. Whereupon he promised with an oath to give her whatsoever she would ask. 8And she, being before instructed of her mother, said, Give me here John Baptist's head in a charger. 9And the king was sorry: nevertheless for the oath's sake, and them which sat with him at meat, he commanded it to be given her. 10And he sent, and beheaded John in the prison. 11And his head was brought in a charger, and given to the damsel: and she brought it to her mother. 12And his disciples came, and took up the body, and buried it, and went and told Jesus.
In the gospel accounts, Herod Antipas held a party in Galilee
for the senior men. The daughter of his new wife, Herodias,
entranced him with her dancing and he offered to give her anything
she wanted. Herodias wanted John the Baptist dead for criticising
her marriage to Antipas, after divorcing Philip, so she told her
daughter to ask for John's head on a platter. Herod Antipas was
loathe to have John killed, but was forced to keep his promise. In
the synoptic gospels (Matthew, Mark and Luke), John was executed
right at the very beginning of Jesus' ministry, apparently about 29
The historical account, told by Josephus, is somewhat different. The gospel account is correct in that John the Baptist had publicly criticised Antipas' marriage to Herodias, which took place in 34 CE. But Herod himself had wanted John killed, lest he start an uprising among the people of Galilee. There was no party in Galilee and John the Baptist died in 35 or 36 CE in the faraway castle of Macherus. The relevant text from Book 18 of Antiquities of the Jews says:
"Now many people came in crowds to him, for they were greatly moved by his words. Herod, who feared that the great influence John had over the masses might put them into his power and enable him to raise a rebellion (for they seemed ready to do anything he should advise), thought it best to put him to death. In this way, he might prevent any mischief John might cause, and not bring himself into difficulties by sparing a man who might make him repent of it when it would be too late. Accordingly John was sent as a prisoner, out of Herod's suspicious temper, to Macherus, the castle I already mentioned, and was put to death."