The content of this article is derived from notes and drafts of the Harry Potter books/films/games that were cut before being released. As such, the contents of the article may or may not be considered canonical.
In 1992, in around his five-hundreth Deathday, the ghost of Sir Nicholas de Mimsy-Porpington authored a ballad titled "The Ballad of Nearly Headless Nick" explaining why he was sentenced to beheading and how his head had (nearly) come off in a botched execution:
It was a mistake any wizard could make,
Who was tired and caught on the hop,
One piffling error, and then, to my terror,
I found myself facing the chop.
Alas for the eve when I met Lady Grieve,
A-strolling the park in the dusk!
She was of the belief I could straighten her teeth,
Next moment she'd sprouted a tusk.
I cried through the night that I'd soon put her right,
But the process of justice was lax;
They'd brought out the block, though they'd mislaid the rock,
Where they usually sharpened the axe.
Next morning at dawn, with a face most forlorn,
The priest said to try not to cry,
"You can come just like that, no, you won't need a hat,"
And I knew that my end must be nigh.
The man in the mask who would have the sad task,
Of cleaving my head from my neck,
Said "Nick, if you please, will you get to your knees,"
And I turned to a gibbering wreck.
"This may sting a bit" said the cack-handed twit,
As he swung the axe up in the air,
But oh the blunt blade! No difference it made,
My head was still definitely there.''
The axeman he hacked and he whacked and he thwacked,