He was of Turkic origin, and was acquired along with his sons as a military slave ("ghulam") by al-Mu'tasim in 819/820. He is first mentioned in 825, and then again in 835, when he led reinforcements in the fight against the Khurramite rebels of Babak Khorramdin. Bugha also participated in Mu'tasim's Amorium campaign in 838, where he led the rearguard, and later served as the Caliph's chamberlain. In 844/845, he suppressed a revolt of the Bedouin tribes of central Arabia.