Mehmed Alajbegović was born in Bihać on 7 May 1906, into a Bosniak family. Both his father and grandfather had been mayors of Bihać. Alajbegović finished elementary school and high school in the town and moved to Zagreb in 1928, where he studied law at the University of Zagreb. He received his doctorate in 1934. During his studies, he visited many foreign cities and spent a great deal of time in Paris, where he worked as a Croatian-language teacher. After receiving his doctorate, Alajbegović was named judge at the district court of Prozor. He went on to study Sharia law at the University of Algiers, from which he graduated in 1940. Beginning in 1938, he was also a judge and secretary at the Administrative Court of Zagreb. Alajbegović was one of the participants in establishment, member and a committeeman, of Društvo bosansko-hercegovačkih Hrvata u Zagrebu which was established in March 1939.
Following the establishment of the Independent State of Croatia in April 1941, Alajbegović left his role as professor of Islamic studies at the University of Zagreb and became a diplomat. In August 1941, he became a secretary in the NDH Foreign Ministry. On 27 January 1942, Alajbegović was named Consul to the German Reich in Munich. He held this position until 11 October 1943, when PoglavnikAnte Pavelić made him Minister of Welfare for Perished Lands. In this position, he was responsible for securing more than 300,000 mostly Muslim refugees from various parts of the NDH in eastern Bosnia, Herzegovina and Sandžak; most of these were fleeing the Chetniks. On 5 May 1944, Alajbegović was named Foreign Minister. The Germans interpreted this as an attempt to appease Muslims in the NDH. On 18 and 19 September 1944, Alajbegović accompanied Pavelić on a diplomatic visit to Berlin and met with German leader Adolf Hitler. In the last months of World War II, he attempted to reconcile nationalist factions fighting in occupied Yugoslavia, such as the Montenegrin separatist leader Sekula Drljević, Slovene collaborationist leader Leon Rupnik and Chetnik leader Draža Mihailović, in order to form an anti-communist coalition to combat the powerful Yugoslav Partisans and the Red Army. Alajbegović remained Foreign Minister until 6 May 1945, when he fled Zagreb together with other high-ranking NDH officials. He fled Yugoslavia and sought sanctuary in Krumpendorf, Austria. He then moved to Salzburg, where he was arrested by Allied forces on 6 September 1945. He was briefly detained in a prisoner-of-war camp in Glasenbach. Alajbegović was extradited to Yugoslavia three days later, on 9 September. While being interrogated by Yugoslav intelligence agents, he was asked why he joined the Ustaše. He responded, "the main motive that led me to join them was that they had an idea for a Croatian state. A great influence on me was made by cognition about the right of the Croatian people to have a state, and other motives were ignored." Alajbegović was charged with various crimes and tried by the Supreme Court of the People's Republic of Croatia in May 1947. He was found guilty of collaboration and sentenced to death on 7 June 1947 and executed the same day.