Ahmad belonged to a dehqan family of Merv known as the Kamkarian family, which claimed descent from the last Sasanian king, Yazdegerd III. Ahmad was the son of a certain Sahl, and had three unnamed brothers, who were later killed during a local struggle in Merv between Iranians and Arabs. Ahmad, in order to avenge his three brothers, revolted against his overlord, the Saffarid ruler Amr ibn al-Layth (r. 879–901), but was defeated and taken prisoner in Sistan. However, he managed to escape and then returned to Merv, where he captured the local governor Abu Ja'far Ghuri and proclaimed his adherence to Samanid ruler Isma'il ibn Ahmad (r. 892-907). He shortly went to the Samanid court at Bukhara and quickly achieved prominence under Isma'il.
In 900 (or 901), Ismail defeated and captured Amr at Balkh, and shortly conquered his territories in Khurasan, which Ahmad also played a role in. In ca. 902, Ahmad was appointed as the governor of the newly conquered province of Tabaristan. He later served as the commander of the army in Ray and also as leader of the personal guards of the Samanid prince who governed the city, Abu Salih Mansur. During the reign of Isma'il's successor, Ahmad Samani (r. 907-914), Ahmad was sent in 910-11 along with other prominent Samanid officers to conquer Sistan.
During the reign of Ahmad's successor, Nasr II (r. 914-943), Ahmad was sent in 919 to suppress the rebellion of the governor of Khurasan, Husayn ibn Ali Marvarrudhi, which he managed to accomplish. Husayn was captured during the battle and was sent to Bukhara. After a few weeks, however, after being lied to by Nasr, who had been promising him a certain thing, Ahmad shortly rebelled at Nishapur, made incursions into the Samanid city of Gorgan, and managed to repel its governor Karategin. He then fortified himself in Merv to avoid a Samanid counter-attack. Nevertheless, the Samanid general Hamuya ibn Ali managed to lure Ahmad out of Merv and defeated him in a battle at Marw al-Rudh. Ahmad was captured during the battle and imprisoned in Bukhara, where he remained until his death in 920.