Definition
To act in a way that creates significant problems or harm for oneself, sometimes with severe consequences.
He is constantly criticizing his manager in the office, which is like digging his own grave.
If you don't stop these reckless actions, you'll soon be digging your own grave.
His decision to join that failing company was like digging his own grave.