The Defender-in-chief (taiwei 太尉) was the highest military commander of the empire. The title first appears in the book Lüshi chunqiu 呂氏春秋 that was compiled in the state of Qin 秦 (221-206 BC). Liu Bang 劉邦, eventual founder of the Han dynasty 漢 (206 BCE-220 CE), appointed Lu Wan 盧綰 (247-193) as his Defender-in-chief. When Liu Bang assumted the title of emperor, Zhou Bo 周勃 (d. 169 BCE) became Defender-in-chief. The office was in the following decades occupied quite irregularly and seemed to be used only in case of need, meaning, if an important campaign was to take place, like Liu Bang's war against Chen Xi 陳豨 (d. 195 BCE) or Emperor Jing's 漢景帝 (r. 157-141) war against the Seven Princes.
Guan Ying 灌嬰 (d. 176 BCE), Zhou Yafu 周亞父 (d. 143 BCE) and Tian Fen 田蚡 (d. 131 BCE) were early holders of his post. In 51 CE, Emperor Guangwu 漢光武帝 (r. 25-57) joined the office of General-in-chief serving as Commander-in-chief (dasima dajiangjun 大司馬大將軍) with that of the Defender-in-chief. During the Later Han period 後漢 (25-220), occupants of the post were often concurrently Counsellors-in-chief.
After the Han, the office was first identified as one of the Three Dukes (sangong 三公). Holders of the office were highly venerated, had the highest salary among all state officals, but had no political power at all, inspite of disposing of a bureau staffed with personnel. The Defender-in-chief was only a vain honorary title. During the Tang period 唐 (618-907) even the bureau was dissolved. The title was rarely used during the Yuan period 元 (1279-1368) and was abolished during the Ming 明 (1368-1644).