Mikhail Chernyaev was born in 1828 in Bender, in the Bessarabia Governorate of the Russian Empire. He belonged to a Russian noble family descended from Novgorodian boyars. His father was Grigory Nikitich Chernyaev (1787 – 1868), an officer, a participant of the Battle on Borodino. His father was a commandant of a number of French towns after the defeat of Napoleon. During 1841, he was appointed the city governor of Berdiansk. He was educated at the Nicholas Staff College, enlisted in the army in 1847, and distinguished himself in the Crimean War and in the Caucasus Mountains region. After serving as divisional Chief of Staff in Poland, he went to Orenburg in 1858 as assistant to the commander of the line of the Syr-Darya, and the next year commanded an expedition to assist the Kazakh tribes on the borders of the Aral Sea against the Khanate of Khiva. He did duty on the staff of the Army of the Caucasus for a time, and returned to Orenburg as Chief of Staff.