Entering the harem Wang was born to a prominent family of Baopin Village, Zigui County (now Zhaojun Village, Xingshan County,
Hubei) in the south of the Western Han empire. As she was born when her father was very old, he regarded her as "a pearl in the palm". Wang Zhaojun was endowed with dazzling beauty with an extremely intelligent mind. She was adept at playing the
pipa and also mastered the ancient "
Four Arts of the Chinese Scholar" – the
guqin,
go,
calligraphy and
Chinese painting. In 36 BC,
Emperor Yuan of Han chose his concubines from the whole state. Because of Wang's fame in the county, she was his first choice as concubine Nan County. Emperor Yuan issued an edict that Wang should enter his harem soon. Wang's father said that his daughter was too young to enter the harem, but could not violate the decree. Wang left her hometown and entered the harem of Emperor Yuan in early summer. According to the custom in the palace, when choosing a new wife, the Emperor was first presented with portraits of all the candidate women. It is said that because of Wang's confidence of beauty and temperament, she refused to bribe the artist Mao Yanshou as the other maids did. As a reprisal, Mao Yanshou painted a mole of widowed tears on Wang's portrait. As a result, during her time in the Lateral Courts, Wang Zhaojun was never visited by the Emperor and remained as a palace
lady-in-waiting. Wang Zhaojun's portrait was either never viewed by the Emperor or was inaccurate, and therefore the Emperor overlooked her.
Departing for the frontier In 33 BC,
Huhanye visited
Chang'an as part of the tributary system that existed between the Han and
Xiongnu governments. He took the opportunity to request to become an imperial son-in-law, which is recorded by Lou Jingde. Typically the daughter of a concubine would then be offered, but unwilling to honour Huhanye with a real princess, Emperor Yuan ordered that the plainest girl in the harem be selected. He asked for volunteers and promised to present her as his own daughter. The idea of leaving their homeland and comfortable life at court for the grasslands of the far and unknown north was abhorrent to most of the young women, but Wang Zhaojun accepted. When the matron of the harem sent her unflattering portrait to the Emperor, he merely glanced at it and nodded his approval. Only when summoned to court was Wang Zhaojun's beauty revealed. The Emperor considered retracting his decision, but it was too late by then, and he regretfully presented Wang Zhaojun to Huhanye, who was delighted. Relations with the Xiongnu subsequently improved, and artist Mao Yanshou was subsequently executed for deceiving the Emperor.
Life with the Xiongnu Wang Zhaojun became a favourite of Huhanye Chanyu, giving birth to two sons. Only one, Yituzhiyashi (), seems to have survived. They also had two daughters, Yun () known as Subu Juci () and Dangyu Juci (). Yun was created Princess Yimuo and would later become a powerful figure in Xiongnu politics. When Huhanye died in 31 BC, Wang Zhaojun requested to return to China.
Emperor Cheng, however, ordered that she follow Xiongnu
levirate custom and become the wife of the next Chanyu, the eldest son (or her stepson, born by her husband's first wife) of her husband. In her new marriage, she had two daughters. Wang was honoured as Ninghu Yanzhi (). ==Cultural legacy==