cut off one's nose to spite one's face

[cut off one's nose to spite one's face] {v. phr.} To suffer from an action intended originally to harm another person.

In walking out and leaving his employer in the lurch, John really cut off his nose to spite his face, since no business wanted to hire him afterwards.