The Sangong 三公 "Three Dukes" were nominally the three highest positions in the central government (except, of course, the emperor).
Although the term sangong is known in Zhou-period 周 (11th cent.-221 BCE) sources, it is far from clear, which offices were concretely meant with this designation. Han-period 漢 (206 BCE-220 CE) scholars of the restaurative new-text school interpreted the sangong as the ministers of war (sima 司馬), of education (situ 司徒) and of works (sikong 司空), while those from the more modern old-text school defined the term as a collective designation for the Grand Mentor (taifu 太傅), the Grand Preceptor (taishi 太師), and Grand Guardian (taibao 太保). Neither the Qin dynasty 秦 (221-206 BCE) nor the Han dynasty used these offices, but the highest power of the central government was lying in the hands of the Counsellor-in-chief (chengxiang 丞相) and the Censor-in-chief (yushi dafu 御史大夫), as well as the highest military commander, the Defender-in-chief (taiwei 太尉). These three offices were during the Han period also often called sangong.
At the end of the Former Han period 前漢 (206 BCE-8 CE), the holders of the office of General-in-chief serving as Commander-in-chief (dasima dajiangjun 大司馬大將軍, i. e. the taiwei of the early Former Han), often regents for infant emperors, became more powerful than the Counsellor-in-chief. The office of Censor-in-chief was therefore renamed to Grand Minister of Works (dasikong 大司空), and that of the Counsellor-in-chief to Grand Minister of Education (dasitu 大司徒) with the outcome that the three highest offices (sangong) at the very end of the Former Han were the Counsellor-in-chief, the Commander-in-chief and the Censor-in-chief. This constellation corresponded to the image of the adherents of the new-text tradition of how the old Zhou-period government (see political system of the Zhou) had looked like. In fact, the General-in-chief was still the most powerful person.
This situation did not change during the Later Han period, but the General-in-chief (dasima) was renamed Defender-in-chief (taiwei), and the attribute da "Grand" was dropped form the titles of the ministers of education and works. Because the three offices fulfilled factual functions in the central government, they also disposed of a subordinated bureaucracy, the Three Offices (sanfu 三府). The founder of the Later Han dynasty 後漢 (25-220), Emperor Guangwu 漢光武帝 (r. 25-57), restricted the power of the high ministers and shifted resonsibility to the Imperial Secretariat (shangshutai 尚書臺). At the end of the Later Han period, the kinsmen of empresses (waiqi 外戚) again assumed domination over the imperial house and were often appointed Commanders-in-chief (dajiangjun). The Three Dukes lost all political influence and were abolished during the time of the Counsellors-in-chief Dong Zhuo 董卓 (d. 192) and Cao Cao 曹操 (155-220).
Cao Cao's son Cao Pi 曹操 (187-226), founder of the Wei dynasty 魏 (220-265), did reinstall the three offices and also granted them the highest salary of all state officials, along with some administrative responsibility.
In later times, the Grand Mentor, Grand Preceptor and Grand Guardian were vain titles of highest reverence, but they were offices without any political influence.