Yu Xuanji (simplified Chinese: 鱼玄机; traditional Chinese: 魚玄機; pinyin: Yú Xuánjī; Wade–Giles: Yü Hsüan-chi, approximate dates 844–868/869), courtesy names Youwei (Chinese: 幼微; pinyin: Yòuwēi) and Huilan (simplified Chinese: 蕙兰; traditional Chinese: 蕙蘭; pinyin: Huìlán), was a Chinese poet and courtesan of the late Tang dynasty, from Chang'an. She was one of the most famous women poets of Tang, along with Xue Tao, her fellow courtesan.
Her family name, Yu, is relatively rare. Her given name, Xuanji, means something like "Profound Theory" or "Mysterious Principle," and is a technical term in Daoism and Buddhism. "Yòuwēi" means something like "Young and Tiny;" and, Huìlán refers to a species of fragrant orchid. She is distinctive for the quality of her poems, including many written in what seems to be a remarkably frank and direct autobiographical style; that is, using her own voice rather than speaking through a persona.
Little trustworthy information is known about the relatively short life of Yu Xuanji. She was born or grew up in Tang capital Chang'an, which was the terminus of the Silk Road and one of the most sophisticated cities of its time. Yu was married as a concubine, or lesser wife, to an official named Li Yi (simplified Chinese: 李亿; traditional Chinese: 李億; pinyin: Lǐ Yì) at 16, and after separating three years later she became a courtesan and a Daoist nun. She was a fellow of Wen Tingyun, to whom she addressed a number of poems. She died early, at the age of 26 to 28. Apart from names and dates in her poems, the tabloid-style Little Tablet from the Three Rivers, (三水小牘), gives the only purported facts about her life, although these are salacious in detail: that she had an affair with Wen Tingyun, lived a scandalously promiscuous life, and was executed for allegedly beating her maid to death. This account is considered semi-legendary, and may be a reflection of the traditional distrust of women who were strong-willed and sexually independent.