Shangguan Wan'er was the granddaughter of Shangguan Yi, a famous poet of the Early Tang. Shangguan Yi was opposed to Empress Wu's political ambitions and consequently found himself accused of taking part in a conspiracy against the state for which he was put to death. Shangguan Wan'er's father was executed for a similar crime but his daughter not only escaped being implicated but eventually came to hold an important position in Empress Wu's court. Shangguan Wan'er was clever beyond her years, discerning and manipulative; qualities which found favour with the empress who saw in the young girl something of herself.
She was summoned to the court and given the title Jieyu, a title befitting a high- ranking concubine. Soon the empress made use of her not only to write imperial edicts, but also to spy on her courtiers. Shangguan Wan'er devoted herself single-mindedly to Empress Wu and, as a result, became more and more powerful. When Tang Emperor Zhongzong ascended to the throne, Shangguan Wan'er was awarded the title Zhaorong and was responsible for the imperial harem. Later, she became the favourite of Empress Wu's nephew, Wu Sansi. Empress Wu grew increasingly fond of Shangguan Wan'er so when she came to rule in her own right as Empress Zetian, Shangguan Wan'er was always by her side; dealing with matters of vital importance on the government and state. During this time, she shouldered all the responsibilities of a prime minister without the actual title.
When Empress Wu abdicated and her son Zhongzong was restored to the throne, Shangguan Wan'er no longer had the right to participate in government affairs. Dissatisfied with her predicament, she consulted Emperor Zhongzong who allowed her to retain her title as Zhaorong, and took charge of the harem of Empress Wei, aspiring to follow in the footsteps of Empress Wu, poisoned Emperor Zhongzong. Shangguan Wan'er then sought Empress Wei's patronage. The new empress enjoyed power for only a short time and was put to death when Li Longji, Prince of Linzi, stormed the palace. As a member of Empress Wei's clique, Shangguan Wan'er was also killed.
Shangguan Wan'er was known for her deep understanding of literature and for being both a peer and an astute critic of poetry. Whenever Emperor Zhongzong was presented with poems during banquets in praise of Confucian scholars, he would call upon her to determine which ones were superior. As a result of this, she found a place in China's literary history. However, her own poems were somewhat frivolous and flowery.