Complex sentence: Because of his atheism, Diderot had little success in the imperial capital, and when he criticized Catharine's style of governing, Grimm moved away from him.
Split into simpler sentences: Because of his atheism, Diderot had little success in the imperial capital. When Diderot criticized Catharine's style of governing, Grimm moved away from him.