In the series Death Note, two different shinigami die to save Misa Amane, and according to the books Misa would receive all of their remaining life span? So how come Misa dies in prison so soon after Light's death?
Although John Demetriou makes some valid points, I don't agree.
Shortly after Light's death, Misa can be seen standing on top of a ledge of a tall building alone. Although it is possible she committed suicide, I don't believe this. It is true she was obsessed with Light and more so with Kira. However, I think her personality was not completely suicidal. She had a more of a "will remember Kira forever" kind of expression at the end of the series.
In the Manga:
She died in the Manga via suicide, 1 year after Light. Date of Death: February 14, 2011
I may be mistaken but
At the end of the series, shortly after Light's death, Misa is seen standing on top of a ledge of a tall building alone. Although it is not shown, it is possible that she committed suicide following Light's death. Misa committed suicide because someone ("probably Matsuda", as Ohba says) accidentally revealed the fact that Light was dead. This caused her to spiral into depression and kill herself. Every human has a specific amount of time to live. Say a human were to live seventy years; if that human is fifty, and a Shinigami writes down their name in a Death Note, then that Shinigami will get the 20 extra years which that human was supposed to live. Though there is also the aspect of free will. It is someone's own choice whether or not they want to commit suicide. So more or less no matter how many years you have left if you choose to commit suicide then you die and all the remaining years are lost
As it was not said how she died in the anime, but in the manga it states she committed suicide and the anime tried to tie that in but did not actually show it. So they must have just put her on the roof to demonstrate that she committed suicide that day. But they did leave some questions (I assume that she did commit suicide). It is also for you to see if you want her to have committed suicide or just died in prison.