After Bolshevik takeover of Azerbaijan, he supervised cultural and educational activities within the government of Azerbaijan SSR. Avoiding constant persecution, he moved to Ulyanovsk in 1930, and from there to Alma Ata. In 1934, he was appointed Deputy Minister of Education of Kazakh SSR. In 1938, Pepinov was arrested as a result of Stalinist repressions. He died the same year in Alma Ata.