Huaiyi (懷義; died December 25, 694), né Feng Xiaobao (), also referred to as Xue Huaiyi (), was a Buddhist monk who was known for being the lover of Wu Zetian, the only female emperor in the history of China.

Background 
Huaiyi, whose birth name was Feng Xiaobao, was from Hu County (鄠縣, in modern Xi'an, Shaanxi).  He was making a living by selling medicines on the streets of Tang Dynasty's eastern capital Luoyang, when he was spotted by Princess Qianjin, a daughter of Tang's founder Emperor Gaozu. In or before 685, she recommended him to Empress Dowager Wu, later known as Wu Zetian, then regent over her son Emperor Ruizong.  

Empress Dowager Wu favored him greatly, and in order to facilitate his being able to come in and out of the palace, had him undertake tonsure to become a Buddhist monk with the name Huaiyi.  Because Huaiyi came from a lowly household, in order to elevate his status, Empress Dowager Wu had him adopted into the clan of her son-in-law Xue Shao () (the husband of her daughter Princess Taiping) and had Xue Shao treat Huaiyi as an uncle.

As Wu Zetian's lover 
It was said that when Huaiyi entered and exited the palace, he would ride on an imperial steed and have some 10 eunuchs attend to him.  Whenever people saw him, they avoided him—because he was accustomed to batter those who came near him and toss them aside. He was particularly hateful of Taoist monks, and whenever he encountered them, he would batter them severely, sometimes cutting their hair off. Even the most honored governmental officials, including Empress Dowager Wu's powerful nephews Wu Chengsi and Wu Sansi prostrated themselves before him. 

He gathered a group of young thugs and had them undertake tonsure but serve as his followers. When these followers carried out unlawful deeds, few officials dared to speak about this. One exception was the assistant censor Feng Sixu (), who punished them according to their deeds, and on one occasion, when Huaiyi encountered Feng Sixu on the road, he had Feng Sixu battered so severely that Feng Sixu nearly died. 

Sometime around 686, there was an incident when Huaiyi encountered the chancellor Su Liangsi. Huaiyi did not greet Su and displayed himself arrogantly. In anger, Su ordered his guards to seize Huaiyi and slap him. When Huaiyi complained to Empress Dowager Wu, she responded semi-jocularly, "Your Eminence should enter through the North Gate [(i.e., directly into the palace without going through the governmental buildings to the south of the palace)]. The Southern Palace is where chancellors gather; do not violate it."

In 688, Empress Dowager Wu tore down Qianyuan Hall (), and commissioned the construction of the imperial meeting hall (明堂, MIng Tang) over the same location.  She commissioned Huaiyi to oversee the project and conscripted several tens of thousands of men to serve as construction workers.  After the imperial meeting hall was completed later that year, for his contributions, she gave him a general title and created him the Duke of Liang.

In 689, Empress Dowager Wu commissioned Huaiyi to serve as the commander of an army against Eastern Tujue. He advanced to the Zi River (紫河, a tributary of the Yellow River) but did not encounter Eastern Tujue forces. He erected a monument at Chanyu Tower (單于臺, in modern Hohhot, Inner Mongolia) before withdrawing.

In 690, Empress Dowager Wu changed Huaiyi's title to Duke of E. Later that year, she took the throne away from Emperor Ruizong, establishing a new Zhou Dynasty with herself as "emperor."

In 694, Eastern Tujue's khan Ashina Mochuo attacked Ling Prefecture (靈州, roughly modern Yinchuan, Ningxia), and Wu Zetian commissioned Huaiyi, assisted by the chancellors Li Zhaode and Su Weidao, to defend against Ashina Mochuo's attack. Before the army could set out, Ashina Mochuo withdrew, and therefore Huaiyi's army never launched.

Death 
In late 694, Wu Zetian held a grand Buddhist gathering at the imperial meeting hall, and she commissioned a giant painting of Buddha drawn with cattle blood, but claimed that it was miraculous drawn with just the blood from Huaiyi's knee. She hung the portrait at one of the bridges entering Luoyang, Tianjin Bridge ().  At that time, she had another lover, the imperial physician Shen Nanqiu (), and this drew jealousy from Huaiyi.  Huaiyi secretly set fire to the Heavenly Hall (), north of the imperial meeting hall, and the fire burned both halls to the ground.  When Wu Zetian ordered the reconstruction of both halls, she still put Huaiyi in charge of the construction.

After this incident, Huaiyi grew increasingly arrogant and unreasonable, and Wu Zetian began to despise him.  To guard herself, she selected a group of strong ladies in waiting.  She then had Wu Youning the Prince of Jianchang (the grandson of her uncle Wu Shirang ()) lead a group of strong soldiers to set an ambush at Yaoguang Hall (). When Huaiyi went to Yaoguang Hall, Wu Youning and his soldiers overpowered him and battered him to death.  Huaiyi's body was taken to White Horse Temple and cremated, and then mixed into mud that was set to be used to construct a pagoda.

In popular culture
A portrait of Huaiyi as supervillain appears in the quasi-historical novel Deception (also titled Iron Empress), by Eleanor Cooney and Daniel Altieri.

Notes and references 

 Old Book of Tang, vol. 183.
 New Book of Tang, vol. 76.
 Zizhi Tongjian, vols, 203, 204, 205.

Tang dynasty generals at war against the Göktürks
Tang dynasty Buddhist monks
694 deaths
Year of birth unknown
People from Xi'an
Tang dynasty generals from Shaanxi
Wu Zetian