Dr. Mark Greene, a main character on the TV show ER, died from an aggressive and inoperable brain tumor called glioblastoma multiforme in Season 8, Episode 21, titled "On The Beach." After being diagnosed and undergoing treatment, he spent his last months reconnecting with his family and took a final trip to Hawaii with his daughter. There, he passed away peacefully in his sleep while listening to the song "Somewhere Over The Rainbow".
The death of Dr. Greene's character was planned due to actor Anthony Edwards wanting to leave the show to spend more time with his family after eight years on ER. The writers gave the character a powerful and emotional exit consistent with his role on the series.
In summary, Dr. Greene's departure from ER was due to the actor's personal decision, and the character died of brain cancer in a poignant storyline on the show.