Desmond’s story in Lost season 3 was shaped by Mr. Eko’s surprising exit from the ABC series. After joining the fold in the beginning of season 2, Mr. Eko (Adewale Akinnuoye-Agbaje) emerged as a key player in the main characters’ efforts to survive on the island. His important role is partly why it was such a huge shock when the series suddenly killed him off.
Mr. Eko’s time on the island came to an end in Lost season 3 when he became the first main character to die at the hands of the Smoke Monster. After pursuing what looked to be the ghost of his brother, Mr. Eko was viciously murdered by the apparition, who stood revealed as the mysterious Smoke Monster. Though the decision to kill the character was met with criticism, it’s since been explained that writing him off as early as season 3’s fifth episode wasn’t a decision made by the show’s creative team. Instead, it was the actor himself who wanted to leave the series. Akinnuoye-Agbaje arranged with the showrunners for his character’s story to reach a conclusion early on in season 3.
Related: Why Lost's Creators Hate Season 3's Jack Tattoos Episode
Comments that have been made about the original plan for Mr. Eko reveal that his death resulted in significant changes to Desmond’s story. In the show, Desmond developed the ability to see visions of the future. At the crux of this story was Desmond’s discovery that Charlie was fated to die. Desmond’s visions and his efforts to stop the inevitable turned into a slow-burning arc that lasted until the end of the season when Charlie made the ultimate sacrifice in the season 3 finale. According to Lost co-creator Damon Lindelof, this role was supposed to go to Mr. Eko, who already had an established dynamic with Charlie [via
Read more on screenrant.com