So, this story caught my eye. In short, an Indonesian politician who championed anti-pornography laws was caught on camera viewing porn during Parliamentary debate. The article notes he may be prosecutable under the anti-pornography laws he championed.
This strikes me as an unusually concentrated moment of poetic justice. Hypocrisy in politics being what it is, I’d be shocked if it was without precedent. Are there any other examples of people hoisting their own legal petard so directly?
Going way back to antiquity, the biblical book of Esther has the villain Haman executed under the same laws he brought to pass.
Eliot Spitzer passed prostitution laws while governor, IIRC.
Spitzer was never charged with anything.
I recall reading about a Qin dynasty high official of the Legalist persuasion who as part of the general totalitarian legislation ordered innkeepers to report to the local magistrates on any suspicious hotel guests. Later on the guy fled from his enemies at the royal court, stayed at an inn without some paperwork and was handed over to arrest and subsequent execution. It sure served the bastard right 
I cannot remember the name and it seems that the story did not make it into wikipedia; there weren’t that many Qin high officials that we know and care about but google does not return anything.
Supposedly, Clinton signed the workplace harassment law he was deposed under.
Supposedly.