Ohare left the show on an ending the season agreement due to increasing effects of mental illness that eventually claimed him in 2010 or 2011. It is said to have not been preplanned.
There's some more information here.
And a quote from the same article;
In 2012, Michael O'Hare, who played the original Commander of Babylon
5, Jeffrey Sinclair, passed away. During his life, however, fans were
unaware of the fact that he suffered from delusions and paranoia due
to mental illness.
That was the real reason he left the show after
only one season. Straczynski explained how O'Hare struggled, how he
was barely able to come back for a two-parter to close his character's
story, but above all, that O'Hare wanted people to know the truth
after his death.