|Duke of Yan (燕公)|
|Tenure||265 – ?|
|Prince of Yan (燕王)|
|Tenure||232 – 265|
|House||House of Cao|
Cao Yu (fl. 211–265), courtesy name Pengzu, was a prince of the state of Cao Wei during the Three Kingdoms period of China. He was a son of Cao Cao, a warlord who rose to power towards the end of the Han dynasty and laid the foundation of Wei. Cao Yu's son, Cao Huan, was the fifth and last emperor of Wei.
Cao Yu was a son of Cao Cao and his concubine Lady Huan (環夫人). He had two brothers who were also born to Lady Huan – Cao Chong and Cao Ju (曹據). He was enfeoffed as a Marquis of a Chief District (都鄉侯) in 211 during the reign of Emperor Xian in the Eastern Han dynasty, and was promoted to a county marquis under the title "Marquis of Luyang" (魯陽侯) in 217.
In 221, a year after Cao Yu's elder half-brother, Cao Pi, ended the Han dynasty and established the state of Cao Wei, Cao Yu became a duke, and was enfeoffed as the Prince of Xiapi (下邳王) in the following year. In 224, his princedom was changed from Xiapi (下邳; present-day Pizhou, Jiangsu) to Shanfu County (單父縣; present-day Shan County, Shandong).
In 232, during the reign of Cao Rui (Cao Pi's son and successor), Cao Yu's title was changed to "Prince of Yan" (燕王). Cao Rui had been very close to Cao Yu in his childhood and he favoured the latter, so he treated Cao Yu exceptionally after ascending the throne in 226 upon his father's death. In 235, Cao Yu was summoned to serve in the Wei imperial court. He returned to Ye (鄴; in present-day Handan, Hebei) in 237, but was summoned back to the Wei capital Luoyang in the summer of 238. Cao Rui became seriously ill in the winter of 238–239 and he appointed Cao Yu as General-in-Chief (大將軍) in the hope that Cao Yu would assist his successor in governing the state. After serving as General-in-Chief for a few days, Cao Yu had the intention of resigning. At the same time, Cao Rui had also changed his mind so he relieved Cao Yu of his duty. Cao Yu returned to Ye in the summer of 239 after Cao Rui's death.
In 260, after the fourth Wei ruler Cao Mao was killed in a failed coup against the regent Sima Zhao, Cao Yu's son Cao Huan, the Duke of Changdao District (常道鄉公), was chosen to be the new emperor and he ascended the throne shortly after Cao Mao's death. Cao Yu remained as the Prince of Yan when his son was a nominal emperor under Sima Zhao's control. The number of taxable households in his princedom increased throughout the reigns of Cao Rui, Cao Fang, Cao Mao and Cao Huan until it reached 5,500. On 4 February 266, Sima Zhao's son Sima Yan forced Cao Huan to abdicate the throne in his favour, ending the state of Cao Wei and establishing the Jin dynasty. Sima Yan became the emperor and he granted Cao Huan the title "Prince of Chenliu" (陳留王). Cao Yu's status was reduced from that of a prince to a duke, so he became known as the "Duke of Yan" (燕公).
- Cao Cao, Emperor Wu (武皇帝 曹操; 155–220)
- Furen, of the Huan clan (夫人 環氏)
- Consorts and Issue:
- Lady, of the Zhang clan (張氏)
- Cao Huan, Emperor Yuan (元皇帝 曹奐; 246–302)
- Lady, of the Zhang clan (張氏)
- (燕王宇字彭祖。) Sanguozhi vol. 20.
- (武皇帝二十五男： ... 環夫人生鄧哀王沖、彭城王據、燕王宇， ...) Sanguozhi vol. 20.
- (建安十六年，封都鄉侯。二十二年，改封魯陽侯。) Sanguozhi vol. 20.
- (黃初二年，進爵為公。三年，為下邳王。五年，改封單父縣。) Sanguozhi vol. 20.
- (太和六年，改封燕王。明帝少與宇同止，常愛異之。及即位，寵賜與諸王殊。青龍三年，���入朝。景初元年，還鄴。二年夏，復徵詣京都。冬十二月，明帝疾篤，拜宇為大將軍，屬以後事。受署四日，宇深固讓；帝意亦變，遂免宇官。三年夏，還鄴。) Sanguozhi vol. 20.
- (景初、正元、景元中，累增邑，并前五千五百戶。常道鄉公奐，宇之子，入繼大宗。) Sanguozhi vol. 20.
- (帝初以禮讓，魏朝公卿何曾、王沈等固請，乃從之。 ... 封魏帝為陳留王， ...) Jin Shu vol. 3.
- ([咸寧]四年，陳留國上，燕公是王之父，王出奉明帝祀，今於王為從祖父。) Tongdian vol. 93.