JMS supposedly had contingency plans for losing any of the actors, but O'Hare in particular was difficult because his character was supposed to be the central mythic figure. (This is why he shows up again later on as a guest star; one specific aspect of the character was already set up to the point that they couldn't work their way out of it easily.) Unfortunately, O'Hare had to leave the show for health reasons after the first season.
You can see that in similarities with various characters -- Lyta Alexander/Talia Winters, Jeffrey Sinclair/John Sheridan, Catherine Sakai/Anna Sheridan. (Note that the former encountered First Ones in a season 1 episode, setting up the possibility of her encountering the Shadows between season 1 and 2.)