During the civil war between the rival caliphs al-Amin (r. 809–813) and al-Ma'mun (r. 813–833), Yazid was appointed governor of the Yemen by al-Ma'mun's general Tahir ibn al-Husayn, with a directive to bring the province under al-Ma'mun's control. He accordingly set off for the Yemen with a large body of horsemen, and upon his arrival he convinced the Yemenis to abandon al-Amin and swear allegiance to al-Ma'mun instead. He quickly ran into problems, however, with his policy of supporting the Qahtanite Arabs of the province at the expense of the local "abna", who he treated in an extremely harsh manner. Shortly after the death of al-Amin in 813, word of Yazid's maltreatment of the "abna" reached al-Ma'mun, who responded by stripping him of the governorship. Following his dismissal, he was arrested in Sana'a by his successor Umar ibn Ibrahim ibn Waqid al-Umari and thrown into prison.