Born as Yang Yuhuan, she was initially the wife of Prince Li Mao before being taken as a consort by his father, Emperor Xuanzong. Her beauty and talent in music and dance captivated the emperor, who neglected his duties to be with her. The emperor's obsession led to the rise of her cousin, Yang Guozhong, whose corruption and rivalry with An Lushan fueled the rebellion.
In 756 AD, as Xuanzong fled the capital, his guards mutinied at Mawei Station. They executed Yang Guozhong and demanded the death of Yang Guifei. Faced with no other choice to save his own life and the dynasty, the heartbroken Xuanzong ordered her execution. She was reportedly strangled with a white silk scarf in a Buddhist temple near a pear tree.
A famous anecdote tells that even after her death, her presence remained. It is said that the emperor, upon returning to Chang'an, was so consumed by grief that he sent a Taoist priest to find her soul. This eternal love was immortalized in Po Chu-i's masterpiece, 'The Song of Everlasting Regret' (Changhen ge), which describes their vow to be 'lovebirds in the sky and intertwined branches on the earth'.
Interestingly, a popular legend persists that she did not actually die at Mawei. According to this folklore, a maid was executed in her place, and she escaped to Japan. In Japan, she is known as Yoko, and there are local shrines and tombs dedicated to her in Yamaguchi Prefecture, where she is said to have lived out her days.