HA! Someone posted L. He wasn't the main character. He was the main antagonist, however.
But still, the correct answer would be in Death Note, Light Yagami gets shot by Matsuda at the end and dies from Ryuk writing his name soon after.
It was a really depressing scene, actually.