 He had studied in the Russian school in the city of Shamakhi and later (after receiving a government scholarship) in Tiflis before being admitted to the department of mathematics and physics at Moscow University in the 1860s.Upon graduating he was appointed administrator in the Land Survey Administration in Tiflis and afterwards in the judiciary in Guba.He quit that position to become a science teacher at a secondary school in Baku, where he established a benevolent society to help raise money to make it possible for children of Muslim parents to receive modern education at Russo-Muslim schools.