what's the expression for people who give moralistic lectures, but often are guilty of the same "sin"? [closed]

Solution 1:

A popular idiom for this is the pot calling the kettle black.

From Wikipedia:

"The pot calling the kettle black" is a proverbial idiom that may be of Spanish origin of which English versions began to appear in the first half of the 17th century. The idiom is glossed in the original sources as being used of a person who is guilty of the very thing of which they accuse another and is thus an example of psychological projection.

In other words, a gay preacher who preaches against homosexuality is an example of the pot calling the kettle black.