Emperor Ai of Jin (simplified Chinese: 晋哀帝; traditional Chinese: 晉哀帝; pinyin: Jìn Aī Dì; Wade–Giles: Chin Ai-ti; 341 – March 30, 365), personal name Sima Pi (司馬丕), courtesy name Qianling (千齡), was an emperor of the Eastern Jin Dynasty (265-420). During his brief reign, the actual powers were largely in the hands of his granduncle Sima Yu the Prince of Kuaiji, and the paramount general Huan Wen. According to historical accounts, he had an obsession with immortality, which ironically resulted in his death, as he became poisoned by pills that were given to him by magicians in 364 and eventually died in 365.
Sima Pi was born in 341, during the reign of his father Emperor Cheng of Jin, as Emperor Cheng's oldest son. His mother was Consort Zhou, who in 342 gave birth to his younger brother Sima Yi. In summer 342, Emperor Cheng grew ill. The common succession protocol, as He Chong (何充) pointed out, would mean that his oldest son would succeed to the throne, but Emperor Cheng's uncle Yu Bing (庾冰), wanting a new emperor who would also be connected to his clan as well, persuaded Emperor Cheng to pass the throne to his younger brother Sima Yue the Prince of Langye, also a son of his sister Empress Yu Wenjun, under the reasoning that with the powerful rival Later Zhao to the north, the empire needed an adult emperor. Emperor Cheng agreed, and named Sima Yue as the heir, and Sima Yue succeeded to the throne as Emperor Kang when he died soon after. The one-year-old Sima Pi was instead created the Prince of Langye. He continued in that title after Emperor Kang's death in 344, as Emperor Kang chose to pass the throne to his infant son Sima Dan (as Emperor Mu). It is not known when he married his wife Wang Muzhi, only that she carried the title Princess of Langye.