The story
Derived from the fact that the act of literally twisting a knife that is still inside someone who has just been stabbed will widen the wound and make it even more painful.
Etymology from Wiktionary, CC BY-SA 4.0.
Today it means: To deliberately do or say something to worsen a difficult situation or increase a person's distress, irritation, or anger. Full definition →
Derived from the fact that the act of literally twisting a knife that is still inside someone who has just been stabbed will widen the wound and make it even more painful.
Etymology from Wiktionary, CC BY-SA 4.0.