Consider how John the Baptist's head ended up on a platter.
The Baptist, a man's man if ever one existed, was lauded as a teacher and a prophet. People would come from all over to hear him preach. Even King Herod was fascinated by him and revered him. But John the Baptist was not afraid to call a sin by its name, no matter the audience, and no matter what he risked losing in the process. So he told Herod that it was a sin for him to divorce his wife and take his brother's wife. For this, he was imprisoned and eventually beheaded.
He died because he denounced immorality. Not just any immorality but sexual immorality..... more at link