Fig. to be responsible for one's own downfall or ruin. If you try to cheat the bank, you will be digging your own grave.Those politicians have dug their own grave with their new tax bill. They won't be reelected.
to do something stupid that will cause problems for you in the future He's dug his own grave really. If he'd been a bit more cooperative in the first place they might still employ him.