Sometime before this, Herod had arrested John, tied him up, and put him into prison. Herod did this because of Herodias, who had been the wife of Philip, Herod’s brother.
Herod himself had ordered his soldiers to arrest John and put him in prison in order to please his wife, Herodias. She had been the wife of Philip, Herod’s brother, but then Herod had married her.