Luke 3:18-20 (ESV)
So with many other exhortations he preached good news to the people.  But Herod the tetrarch, who had been reproved by him for Herodias, his brother's wife, and for all the evil things that Herod had done,  added this to them all, that he locked up John in prison.
Added this to them all, that he locked John in prison. So the question arises, does Luke mean by this, that Herod adds to John’s exhortations by locking John in prison, or does he mean that he adds to the evil things he had done, or both. Herod locks John in prison. John is preaching the good news with exhortations. The good news meaning that the kingdom is near, that the Christ is coming. He preaches this with exhortations, which usually has a connotation of law. He is telling the people what to do, how to live, and so on that they be ready for the kingdom. He is exhorting them to be ready. At least that is what one seems to get from the brief sketches of John’s preaching.
The effect of all this had to be humility. The law crushes. It exposes sin. We take the law wrongly if it doesn’t do this to us. When we think somehow we have made ourselves worthy of Christ by our own efforts we have missed the point.
So John preached the law of God and he would not repent for it even in the face of imprisonment. He stood by his convictions. Sure this was an evil thing that Herod did. But just as much it added to the exhortations of John. One must listen to God rather than men. Here was a man willing to do so. And for this the people were ready to listen to him.