作法自斃

Idiom

 * 1) to make laws or rules that harm oneself in the end
 * 2) to reap what one sows; to bear the consequences of one's own misdeeds