Nayyem was born in Kabul in 1981 and lived in an elite district near Hafizullah Amin's palace. In 1984, ten days after his younger brother Masi Nayyem was born, their mother died. He has stated that he is a Pashtun and "Muslim by birth". His native tongue is Dari which is similar to Persian. In Afghanistan, his father, Muhammad Haim (), had been Minister of Education and was responsible for the construction of educational facilities before the USSR invasion of Afghanistan in December 1979. After the Soviet invasion, his father did not want to work for the Soviets and quit his post. In 1987 and because of the destruction of the ongoing Soviet Union's War in Afghanistan, his father went to Moscow to study and met Ukrainian Valentina Kolechko whom he later married in early 1989. Mustafa Nayyem became fluent in Russian and Ukrainian after he moved with his father to Moscow in August 1989 living near the Nakhimovsky Prospekt metro station and later to Kyiv in 1990 attending 61st school near the market.