During the reign of Emperor An 漢安帝 (r. 106-125 CE) he entered imperial service as palace attendant (huangmen congguan 黃門從官) and received the favour of Empress Dowager Deng 鄧太后, who made him a teacher of the heir apparent. When the latter rose to the throne as Emperor Shun 漢順帝 (r. 125-144), Cao Teng was made Palace Attendant-in-ordinary (zhongchangshi 中常侍).
When Emperor Shun died, Cao Tang together with Zhou Fu 州輔, master of the stud (taipu 太僕) of the Changle Palace 長樂宮 he supported the enthronement of Emperor Huan 漢桓帝 (r. 146－167), and was rewarded with the title of Neighbourhood Marquis of Feiting 費亭侯 and the post of Director of the Palace Domestic Service (dachangqiu 大長秋).
For more than thirty years he was one of the most influential eunuchs and served four emperors in sequence. Over the years he recommended some famous persons for appointment in the officialdom, namely Yu Fang 虞放, Bian Shao 邊韶 and Yan Gu 延固. The regional inspector (cishi 刺史) of the province of Yizhou 益州, Zhong Hao 種暠, accused Cao Teng of bribery in contact with the governor (taishou 太守) of the commandery of Shujun 蜀郡, and submitted a remonstrance to the throne. The accusation was not justified, but Cao Teng decided not to fight against it.
When he died, his adoptive son Cao Song 曹嵩, father of the famous warlord Cao Cao 曹操, inherited the title of marquis. He was seen as the ancestor of the house of Cao 曹, founders of the Wei dynasty 曹魏 (220-265), and was by Emperor Ming 魏明帝 (r. 226－239 CE) bestowed the posthumous title of Emperor Gaodi 魏高帝.