He was beheaded
Herod Antipas (ruler of Galilee) had imprisoned John because he reproved Herod for divorcing his wife (Phasaelis), and unlawfully taking his brother Herod Philip I's wife, Herodias.
On Herod's birthday, Herodias' daughter (traditionally named Salome) danced before the king and his guests. Her dancing pleased Herod so much that in his drunkenness he promised to give her anything she desired, up to half of his kingdom.
When the daughter asked her mother what she should request, she was told to ask for the head of John the Baptist on a platter. Although Herod was appalled by the request, he reluctantly agreed and had John executed in the prison.