When Mozart died on December 5, 1791, he left his Requiem Mass in D minor largely unfinished.
Earlier that year, an Austrian aristocrat named Franz von Walsegg asked Mozart to write a Requiem. Count Walsegg's wife died young and he wanted to honor her with the piece. Mozart got half the money up front, the rest to be delivered when the piece was finished.
Count Walsegg didn't want Mozart to know the commission came from him, though. The count intended to put his own name on the score (something he'd been known to do in the past).
In order to keep his identity a secret, Walsegg sent a messenger (who happened to dress in a grey cloak) to Mozart. Mozart referred to him as "the grey messenger".
When Mozart died, he'd only finished the first movement of the Requiem. He was also dirt poor when he died, and his wife needed the rest of that commission money. Mozart's wife, Constanze, asked three different composers to look at Mozart's sketches to see if they could finish it. She needed Count Walsegg to think Mozart completed the Requiem before he died.
Constanze got help from Franz von Sussmayr, Joseph von Eybler and Max Stadler.
The story remained shrouded in mystery until the 20th century, when an Austrian musicologist found a censored report written about the Requiem.
If you've seen the movie Amadeus, you might wonder about Antonio Salieri and his role in the end of Mozart's life. Alexander Pushkin is to "blame" for spinning this tale; he wrote a play in the 19th century called Mozart and Salieri, the basis for the film. Here's a fantastic explanation of the Requiem and Salieri's involvement (or lack thereof).