From what I've read, there was a great deal of animosity between the actors that portrayed Garibaldi and Sinclair and it got to the point were one of them would have to go. As you say, a big improvement with Captain Sheridan taking over.
According to Michael O'Hare's WP page, it was his increasing problems with his mental health and need for extended treatment that led to his being written out.
I'd also heard, at the time, that the network execs wanted someone more action-hero-y than O'Hare, and brought in Boxleitner.
Fred