Somebody's undoing is the cause of their ruin. It was his undoing, prove her undoing, the undoing of the scheme.
It appears almost only in that construction: the thing named comes first and the word follows. It suggests a flaw that brought the ruin about rather than bad luck, which is why it is used of pride, greed and carelessness far more than of accidents.
1nounundoingThe cause of somebody's ruin.
“His love of gambling was his undoing, and he lost the family business.”
undoing is a cause of ruin.
From undo, from Old English undon, to unfasten or destroy, plus -ing.
Middle English
undoinge
English, today
undoing
From Middle English undoinge, undoynge, ondoynge; equivalent to undo + -ing.
Etymology from Wiktionary, CC BY-SA