Dig (one's) own grave phrase
If someone "digs his/her own grave", he/she does something that is considered to be self-destructive or self-sabotaging. His/her action will lead to a negative outcome that is easily predictable.
OMG! Bob is digging his own grave when shouting insults to the police.
Linda always destroys her relationships while they are going well. She digs her own grave, indeed.
A: "What's the matter with you?" B: "I dug my own grave. Last night, I was fuckingly drunk, and I said bad words to my colleagues."
The verb "dig" should be conjugated according to its tense.
The phrase dates from the first half 1900s.
People tend to like forbidden or illegal things just because they are forbidden or illegal.
He must have believed that stolen fruit is the sweetest, and he, therefore, cheated on his partner.