The old phrase, “Hoisted with their own petard,” comes to mind.
Why do I always have to be the bad guy?