Mannerheim was born on June 4, 1867, in Louhisaari Castle in Askainen, to a Finland-Swedish family enobled in 1768. He was related to Adolf Erik Nordenskiöld.
Due to the worsened economic situation of the family, he was sent to a Finnish officer school in Hamina in 1882, at the age of 15, from which he was expelled for disorderly conduct in 1886. Next he applied, and was accepted, to Nikolai Cavalry School in Saint Petersburg, the imperial capital of Russia (Finland being a Grand Duchy in personal union with Russia at the time). He graduated in 1889 and was initially stationed at a cavalry garrison in Poland, but was eventually accepted into the chevalier guard cavalry regiment that was part of the Russian Empress' bodyguard. His family arranged him to be married to Anastasie Arapova, daughter of a Russian general, for economic reasons. They got two daughters, Sophie and Anastasie. The marriage ended in an unofficial separation in 1902 and in a formal divorce in 1919.
Mannerheim volunteered for the Russo-Japanese War in 1904 and was stationed at the 52th Njzhin hussar regiment in Manchuria with the rank of lieutenant colonel. He was promoted to colonel for the bravery in the battle of Mukden.
He also led an expedition to China, travelling from Tashkent to Kashgar from July to October 1906, with the French scientist Paul Pelliot. Shortly thereafter, he led a separate expedition into China until the autumn of 1908. The expedition had strategic purposes, in addition to anthropological, because these areas in northern China were a potential point of crisis between Russia, China and even Great Britain (see: The Great Game). After the trip, he was in 1909 given a position as a regimental commander in Novominski, Poland. In 1912 he became a part of Imperial entourage as a lieutenant general.
In the World War I, Mannerheim served as a cavalry commander at the Austro-Hungarian and Romanian fronts. After the February Revolution in Russia, he fell out of favor and eventually returned to Finland 1917.
In January 1918 the Senate of the newly independent Finland, under its chairman Pehr Evind Svinhufvud, appointed him as Commander-in-Chief for Finland's hardly existing army, not much more than a number of locally set up White Guards. The mission was the defence of the Government during the Civil War in Finland. He accepted the position despite of his misgivings about the German influences in the government. He founded his headquarters in Seinäjoki and begun to disarm the remaining Russian garrisons and their 42,500 troops.
Dismayed of increasing German influence Mannerheim left the country temporarily in May 1918. In September he was summoned back from Paris to become Regent. There were even monarchists who wanted to make him Finland's king. After the elected Väinö I of Finland had aroused the victorious Allies' suspicions, and renounced the throne, Mannerheim secured recognition of the independent Finland from Great Britain and USA. He also requested and received food aid from overseas to avoid famine. Although he was an ardent anti-Bolshevik, he eventually refused an alliance with Russian White generals because they would not have recognized Finnish independence. In 1919 he lost a presidential election in the Parliament to Kaarlo Juho Ståhlberg and retreated from public life.
In the interwar years, his pursuits mere mainly humanitarian. He supported the Finnish Red Cross and founded the Mannerheim's Children's Foundation. In 1929 he refused right-wing radicals plea to become a de facto military dictator although he did express some support of the right-wing semi-fascist Lapua Movement. After president Pehr Evind Svinhufvud was elected 1931, he appointed Mannerheim as chairman of Finland's Defense Council. In 1933 he received the rank of field marshal. He supported Finland's military industry and sought (in vain) to establish a military defence union with Sweden. However, rearming the Finnish army did not work as swiftly as he hoped and he was not enthusiastic about a war. He had many strifes with various Cabinets, and signed numerous letters of resignation.
When negotiations with the Soviet Union failed in 1939, Mannerheim on October 17, 1939, again withdraw his resignation, thereby again accepting the position as Commander-in-Chief of Finland's army in case of war. He reorganized his headquarters in Mikkeli. Officially he became the Commander-in-Chief after the Soviet attack on November 30th. His strategic aide was Aksel Airo.
Mannerheim spent most of the Winter War and Continuation War in his Mikkeli headquarters but made many visits to the front. Between the wars, he held on to the authority as Commander-in-Chief, which according to the letter of law would have gone back to the presidents (Kyösti Kallio and Risto Ryti) after the Moscow Peace, March 12th, 1940. Mannerheim kept relations to the German government as formal as possible and refused Nazi demands for a written treaty of alliance or that Finnish troops should attack the besieged Leningrad.
In the moment when Germany was deemed sufficiently weakened, and USSR's summer offensive was quenched (thank's to President Risto Ryti's agreement with the Germans in June 1944), Finland's leaders saw a chance to reach a peace with the Soviet Union. Risto Ryti resigned, and Mannerheim was elected as president on August 4th, 1944, mainly because he was the only one with sufficient prestige both internationally and domestically. After a month the Continuation War was concluded on harsh terms, but ultimately muss less harsh than that of the other states in the power of USSR. Finland retained its sovereignty, the territorial losses were limited, but the War reparations were heavy. Finland also had to fight the Lapland War against the withdrawing German troops in the north, and at the same time demobilize her army.
Mannerheim resigned for reasons of declining health in 1946. Even Finnish communists, the enemies of 1918, recognized his peacemaking efforts.
Mannerheim was succeeded by his Conservative but russophile Prime Minister Juho Kusti Paasikivi.
Mannerheim retired to the Valmont sanatorium in Montreux in Switzerland to write his memoirs. He died on January 28th, 1951, in Lausanne (Switzerland). His was buried in the Hietaniemi cemetery in Finland in a state funeral with full military honors.