Alekseyev was born in Vyazma, in the Smolensk Governorate of the Russian Empire (present-day Smolensk Oblast, Russia). His father, Vasili Alekseyev, was an army captain in the 64th Kazan Regiment from a modest background. In 1873 Alekseyev entered as a volunteer in the 2nd Grenadiers Regiment in Rostov. He graduated from the Moscow Infantry School in 1876 and was commissioned an ensign in the same 64th Kazan Regiment. He served as an orderly to General Mikhail Skobelev during the Russo-Turkish War (1877–1878), and was wounded in combat near Pleven, Bulgaria. He was promoted to lieutenant in January 1881, and captain in May 1883.
Completing his studies at the Nicholas General Staff Academy in 1890 with the rank of lieutenant colonel, he was posted as a senior adjutant in the headquarters of the 1st Army Corps in the St. Petersburg Military District. He served in this capacity and as a professor at the Academy's Department of Military History from 1898 to 1904. In March 1904, he was promoted to the rank of major general.
With the outbreak of the Russo-Japanese War, in October 1904 Alekseyev was appointed Quartermaster General of the Russian 3rd Manchurian Army. During the war he was awarded a gold sword, the Order of St. Stanislav, and the Order of St. Anne.
After the war, he became first senior quartermaster of the General Staff’s main directorate, while maintaining his position as a professor at the General Staff Academy. In 1908 he was made Chief of Staff of the Kiev military district and promoted to lieutenant general. In 1912 Alekseyev was given command of the 13th Army Corps.
The beginning of World War I in August 1914 saw Alekseyev appointed Chief of Staff of the Southwestern Front (which held the Third, Fourth, Fifth, and Eighth Armies), where he planned the Russian offensive into Galicia with the rank of General-of-Infantry. He was subsequently awarded the Order of St. George (4th class). In March 1915 Alekseyev became the overall commander of the Russian Northwestern Front.
When Grand Duke Nicholas Nikolayevich of Russia stepped down as Russian supreme Commander-in-chief in August 1915 to be replaced by Tsar Nicholas II, Alekseyev was appointed as Chief of Staff of the General Headquarters (Stavka) and placed in charge of all military operations. He served in this capacity from August 1915 to March 1917.
In his capacity as Chief of Staff, Alekseyev proved to be a tradionalist, unable to adapt to tactical changes and the techniques of a modern war. He was also incapable of changing a political system that allowed the promotion of incompetent commanders, through nepotism, patronage and the use of court intrigue. The Great Retreat of 1915 was undertaken on his orders. After the failure of the Battle of Lake Naroch in the spring of 1916, he no longer believed in the ability of the Russian Army to mount an offensive, contributing to the apathy and paralysis which characterized the Russian officer corps towards the end of the war.