Emperor Jianwen of Jin (; 320 – September 12, 372), personal name Sima Yu (), courtesy name Daowan (), was an emperor of the Eastern Jin dynasty in China. He was the younger brother of Emperor Ming and installed by military leader Huan Wen. Prior to taking the throne, he had served in important roles in the administrations of his grandnephews Emperor Mu, Emperor Ai, and Emperor Fei. Both in his service to his grandnephews and in his own reign as emperor, he is generally viewed as a weak-willed figure who showed enough wisdom to continue to survive and extend Jin rule, but whose effectiveness was also compromised by his over-dedication to philosophical discussions of Taoism and other related philosophies.

Early life

Sima Yu was born in 320, as the youngest son of Emperor Yuan, by his favorite concubine Consort Zheng Achun (). As Emperor Yuan's wife Yu Mengmu () had died years earlier (in 312), and the mother of his oldest son Sima Shao the Crown Prince (later Emperor Ming), Lady Xun, had been forced to leave the palace due to Princess Yu's jealousy while she was still alive, Consort Zheng was effectively the mistress of the palace, although she never carried the title of empress. In 322, Emperor Yuan created him the Prince of Langya—the same title that Emperor Yuan had earlier, which was therefore considered a special honor.

Emperor Jianwen of Jin

In 323, Emperor Yuan died. In 326, Consort Zheng also died, and because, as Prince of Langya, Sima Yu was not permitted by law to mourn his mother, he, at age six, requested another title by which he could. His nephew Emperor Cheng (Emperor Ming's son), himself then a young child, permitted it, and created him the Prince of Kuaiji. As he grew in age, he was given a progression of higher and higher posts, although without actual power.

Emperor Jianwen of Jin

During Emperor Mu's reign

In 344, another nephew of Sima Yu, Emperor Kang (Emperor Cheng's younger brother), died, and was succeeded by his infant son Emperor Mu. Emperor Mu's mother Empress Dowager Chu became regent, but she largely followed the advice of prime minister He Chong (). As it was customary, at this point of Jin history, for there to be two prime ministers, He Chong recommended Empress Dowager Chu's father Chu Pou (), who declined and recommended Sima Yu instead. He Chong and Sima Yu thus shared the prime minister responsibilities until He Chong's death in 346. He Chong was replaced by Cai Mo.

Emperor Jianwen of Jin

In 347, after the ambitious general Huan Wen, without the imperial government's approval, carried out a campaign against and destroyed Cheng Han, annexing Cheng Han territory to Jin, the imperial government became apprehensive that Huan would use this opportunity to take over. Sima Yu thus invited the official Yin Hao, who was considered able, to join him and Cai in making important decisions, to counter Huan's influence. In 350, after Cai had repeatedly declined greater honor conferred him by the emperor, Yin accused Cai of disrespecting imperial authority and had him removed, seizing more power than he had before.

In 348, Sima Yu's heir apparent Sima Daosheng (), who was described as careless and frivolous, was accused of unspecified crimes, and he was deposed and imprisoned, and died in imprisonment. Sima Yu's wife and Sima Daosheng's mother, Princess Wang Jianji (), also died in distress. (She might have also been imprisoned prior to her death) His other sons, one by Princess Wang and three by various concubines, died early, and he was left without an heir, and his concubines were not conceiving any more. He retained a magician to look at his concubines to see which one could conceive an heir, and the magician looked at all of them and opined that none was destined to give him an heir—but then he saw a dark-skinned maid who was working with textiles, who was derogatorily referred to as a Malay, named Li Lingrong, and he, in surprised, yelled out, "She is the one!" Sima Yu therefore took her as a concubine, and they had two sons: Sima Yao in 352 and Sima Daozi in 353. Sima Yao was subsequently named heir apparent.

Around the new year 352, Huan, impatient after his requests to advance north in light of Later Zhao's collapse were being rebuffed by Sima Yu and Yin, who were concerned about his expanding power, and mobilized his troops and gestured as if he were about to attack the capital. Yin was shocked, and initially considered either resigning or send the imperial banner of peace (Zouyu Fan, 騶虞幡) to order Huan to stop. After advice from Wang Biaozhi (), however, he instead asked Sima Yu to write a carefully worded letter to Huan, persuading Huan to stop.