He graduated from the military academy in Split, Croatia in 1979. In 1991, he left the JNA with the rank of Captain and deserted to the Army of the Republic of Bosnia and Herzegovina. For most of the war, he was the commander of the 1st Corps, but at the end of the war, he was placed in the war Presidency of Bosnia and Herzegovina. He was very popular in the army and with the people. He was one of the key people in the defense of Sarajevo during the Bosnian War, in a city besieged and helpless amid a relentless onslaught of artillery and sniper fire.
Hajrulahović died of a heart attack when he was visiting his mother in Hamburg, Germany. He was buried in a specially marked grave near Ali Pasha Mosque in Sarajevo.