In 1894 Kagan moved to St Petersburg where he continued his studies with Andrey Markov and Konstantin Posse.
Aging and disillusioned with anti-Semitic practices, he resigned from the university and died in Moscow soon afterwards.