Bamyani was born on 18 December 1951 in Bamyan City in Afghanistan. He was an ethnic Fars of the Hazara tribe. He studied engineering at Kabul University. His father, Sayed Ali Husseini, served as the Deputy Speaker of the Foreign Minister during the 1960s. His grandfather, Sayed Khan Agha, had served in the 1919 Afghanistan's war of independence and as the police chief. Bamyani's family were strong supporters of Zahir Shah, the last king of Afghanistan.