When Michael Emerson was cast as "Henry Gayle" on Lost it was for a short arc and he wasn't supposed to be the leader of The Others. The producers had intended to go in a completely different direction for that role, casting a big, physically imposing actor. But after seeing Emerson's performance they changed their minds and had "Henry" revealed as Ben Linus and eventually the main antagonist of the series.
As noted above, Charles Haid originally died when Hill and Renko were shot at the end of the Hill Street Blues pilot. IIRC the preview audiences loved the character, so the final lines of the show, in which Renko was reported dead at the scene and Hill en route to the hospital in bad shape were re-recorded to say that both cops were expected to live.
Jeff Conaway was only supposed to do a one-shot as security officer Zack Allen on Babylon 5, but Zack became a recurring character, the second in command to security chief Michael Garibaldi and finally a regular. He even did at least one of the TV movies.
Kelly Carlson is another actor who was only hired for a guest appearance in a series pilot (Nip/Tuck) and ended up a regular.
Walter Koenig was set to appear as "Knight One", a zealot who kidnaps and interrogates Cmdr. Sinclair in a first season episode of Babylon 5, but he suffered a heart attack and lost role to another actor. This was bad for Koenig, but good for the show. Losing the one-time character of Knight One meant he could later appear as Alfred Bester, the telepathic "Psy Cop", a role he played in various episodes scattered across all five seasons.
Ed Wasser is another B5 alum with a curious history on the show. Cast as a tech named Guerra on the command and control deck in the pilot, he didn't make the cut when they went to series. But he came back as the memorable Mr. Morden who got up to all sorts of mischief until his untimely and deeply satisfying exit in S4.
Finally on B5, there's the curious case of Pat Tallman. Series creator J. Michael Straczynski had seen her in the first remake of Night of the Living Dead. Pat has very large eyes, and he thought they looked like the eyes of a telepath, capable of seeing inside you. So he wrote the role of resident station telepath Lyta Alexander with her in mind. But she and Warner Bros. were unable to come to terms on a contract, so she didn't return for the series. Rather than simply recast the Lyta role, JMS wrote her disappearance (and the loss of a couple of other cast members) into the story by having everyone connected to the attempt on Ambassador Kosh's life in the pilot mysteriously recalled to Earth during the months between the pilot and the first episode. A new commercial telepath, Talia Winters, played by Andrea Thompson, was added instead. By late in the second season Thompson was feeling under-used in the large ensemble cast and she decided to leave. Luckily Pat was available again and she returned for Talia's dramatic send-off. Pat made a couple of more appearances in S3, where she was introduced as Kosh's aide, before joining the cast full time for the fourth and fifth seasons.
Regards,
Joe