Cut (one's) nose off to spite (one's) face proverb
To harm, hurt or cause problems to yourself when you are trying to do that to someone else.
Her intention was to poison John. However, she ended up cutting her nose off to spite her face when she drank the poisoned wine intended for him.
Mary insisted on the authorities investigating her political opponent on suspicion of tax evasion. Now it seems as though she had cut her nose off to spite her face, as the investigator dropped the tax fraud charges against her.
The verb "cut" must be conjugated according to its tense.
This may come from the story of a Viking attack on a monastery. The nuns in the monastery cut off their own noses so that they would not be attractive to their attackers.
Used to raise caution
Always remember to put safety first whenever you drive.