After riots in the streets of St. Petersburg (then Petrograd), the Tsar was on his way back to the city from the front lines of World War I to deal with the uprisings. With the army turning against him and backing the strikes in the capital, a provisional government was formed.
They demanded the Tsar’s abdication.
Far away from his family, in a train car on his way home, Nicholas II was forced to abdicate.
He initially planned to give the throne to his son Alexei, but changed his mind because of his son’s severe illness, hemophilia, which meant that the boy was unlikely to survive into adulthood. In the end, he abdicated on behalf of his son as well.
That left his brother, Michael, in charge, but Michael never really took the reins, so to speak, and the monarchy was effectively over. The provisional government wouldn’t last very long, either, falling to the Bolsheviks in the November Revolution.