An Lushan was originally surnamed Kang and called Aluoshan (meaning "battle"). After his mother remarried a man surnamed An, he adopted the surname An and took the name Lushan.
After reaching adulthood, An Lushan grew large and had a full beard. He lived long among northern ethnic minorities and was praised for his bravery and ferocity.
In 732 AD, An Lushan was arrested by Zhang Shougui, the military governor of Fanyang, for stealing sheep. Zhang Shougui intended to have him executed. At this critical moment of life and death, An Lushan shouted loudly, "How can you kill a brave man? Don't you want to destroy the Khitan and the Xi tribes?"
Zhang Shougui, noticing An Lushan's extraordinary appearance, released him and appointed him, along with his fellow townsman Shi Siming, as a capture general. Thus began An Lushan's military career. He was strong and robust, fought bravely, and having lived long on the frontier, was very familiar with the local terrain, so he won every battle. To commend his military achievements, Zhang Shougui promoted him to a deputy general. Thereafter, An Lushan fought even more valiantly, continuously earning merits in battle. Zhang Shougui grew very fond of him and even adopted him as a foster son.
In 736 AD, An Lushan, who had been appointed as the General of Pinglu, suffered a defeat while campaigning against the Khitan due to violating military discipline, and according to the law, he should have been executed. Zhang Shougui, who greatly valued him, could not bear to have him beheaded and instead handed him over to the imperial court for judgment.
Prime Minister Zhang Jiuling deeply despised An Lushan. Earlier, when An Lushan came to the court to report on affairs, Zhang had told others, "This man will surely bring chaos to Youzhou in the future." He advocated for executing An Lushan. Emperor Xuanzong of Tang, however, considered An Lushan a brave and fierce general and intended to pardon him.
Zhang Jiuling said: "An Lushan violated military discipline, causing defeat in battle and losses to the army; according to the law, he must be executed. Moreover, I see that his appearance is extremely fierce and malevolent—if we do not kill him, I fear it will lead to endless troubles in the future."
Emperor Xuanzong of Tang said, "How can you determine he will rebel just because he looks fierce?"
In the end, Emperor Xuanzong of Tang still did not kill An Lushan.
An Lushan was cunning by nature and skilled at discerning others' thoughts. Knowing that Zhang Lishan, the Hebei Regional Inspector, was greedy for wealth and profit, he catered to his preferences with flattery. Additionally, he spent large sums of money bribing Zhang Lishan's subordinates to win their favor. After Zhang Lishan returned to the court, he spoke highly of An Lushan before Emperor Xuanzong of Tang. As a result, An Lushan was appointed as the Military Commissioner of Pinglu, the Prefect of Shunhua, and the Governor of Yingzhou. An Lushan also frequently bribed passing envoys, and upon their return to court, they all praised him before Emperor Xuanzong. Consequently, Emperor Xuanzong grew increasingly fond of him and appointed him as the Military Governor of Pinglu, the Prefect of Liucheng, and the Commissioner of the Four Prefectures of the Two Barbarians, Bohai, and Heishui.
In 743 AD, An Lushan fabricated a lie to deceive Emperor Xuanzong of Tang, saying: "Last year, a locust plague struck Yingzhou. I made a vow to heaven: 'If I, An Lushan, am disloyal to Your Majesty or do anything harmful to the Great Tang, then let the locusts devour my heart and liver completely, and I will have no complaint. But if I sincerely revere the gods, may they make the locusts disappear.' After I spoke, a flock of birds flew in from the north and in an instant ate up all the locusts." Upon hearing this, Emperor Xuanzong was greatly pleased and trusted him even more.
Emperor Xuanzong of the Tang Dynasty greatly enjoyed the "Whirling Dance" that originated from the Western Regions. When performing this dance, the dancer had to spin rapidly to the accompaniment of drum music, and the faster the spin, the better the effect. An Lushan, who was stout and heavy-set and even had difficulty walking, was completely unsuited for this type of dance. However, to please Emperor Xuanzong, he practiced diligently and became a master of the "Whirling Dance." Whenever Emperor Xuanzong was in the mood and asked him to perform, An Lushan would dance with great ease, spinning like the wind. On one occasion, Emperor Xuanzong ordered An Lushan to acknowledge Yang Guifei as his mother. At that time, An Lushan was forty-five years old, while Yang Guifei was only in her thirties, yet An Lushan gladly agreed. From then on, when An Lushan paid court to Emperor Xuanzong, if Yang Guifei was present, he would first pay respects to her and then to the emperor. Puzzled, Emperor Xuanzong asked him why he did this. An Lushan replied, "According to the customs of our Hu people, one must first pay respects to the mother and then to the father."
Emperor Xuanzong of Tang was overjoyed upon hearing this. An Lushan frequently sought favor by claiming military achievements. Originally, the Tang Dynasty maintained good relations with the Khitan and Xi tribes in the north, but in order to gain military glory, An Lushan repeatedly invaded their territories. His actions provoked resentment from the Khitan and Xi, who killed the Tang princesses married into their tribes and rebelled against the Tang. An Lushan then seized this opportunity to launch a punitive campaign. After reigning as a peaceful emperor for over twenty years, Emperor Xuanzong grew arrogant and indulgent. He neglected state affairs, spending his days feasting and reveling with Yang Guifei, while Chancellor Li Linfu gradually seized control of the government. Li Linfu was an unlearned man who only sought power and profit, and under his influence, the political situation of the Tang Dynasty became increasingly chaotic.
Thus, An Lushan, commanding a massive army, saw an opportunity to seize the empire, and his ambition swelled day by day as he began preparing for rebellion. He built Xiongwu City north of Fanyang, stockpiling vast amounts of grain and weapons there; petitioned Emperor Xuanzong of Tang to appoint him as the military governor of Hedong; recruited a group of learned civil officials as his advisors; and promoted generals such as Shi Siming, Yin Ziqi, and Tian Chengsi. In addition, he selected eight thousand prisoners from the Khitan and Xi tribes, and also raised over a hundred fierce and skilled household guards.
Yang Guozhong, who became the prime minister after Li Linfu, saw An Lushan's ambition to rebel after hearing that he was continuously recruiting soldiers and horses. He reported this to Emperor Xuanzong of Tang many times. However, Emperor Xuanzong trusted An Lushan deeply and refused to listen to Yang Guozhong's warnings.
Later, the Crown Prince also submitted a memorial to Emperor Xuanzong of Tang, stating that An Lushan was plotting rebellion. Although the emperor still did not fully believe it, he began to grow concerned. He knew that An Lushan commanded over a hundred thousand elite troops, and if he truly rebelled, the consequences would be unimaginable. Therefore, following the advice of Yang Guozhong, he summoned An Lushan to the court to test his intentions.
An Lushan guessed Emperor Xuanzong of Tang's intentions, so he quickly came to the capital to pay respects to the emperor. While crying, he said, "Your subject was originally a barbarian, yet Your Majesty not only did not despise me but repeatedly promoted me. I will never forget Your Majesty's great kindness and virtue. Yang Guozhong is jealous of me and wants to have me killed; the day of my death is near."
From then on, Emperor Xuanzong of Tang placed complete trust in An Lushan, and anyone who reported that An Lushan was plotting rebellion would be handed over to An Lushan for punishment by the emperor's order. As a result, although civil and military officials in the court knew of An Lushan's rebellious intentions, none dared to report it to Emperor Xuanzong.
By the winter of 755 AD, An Lushan's preparations for rebellion were complete.
At that time, the official reporting on affairs had just returned from Chang'an to Fanyang, so An Lushan forged an imperial edict from Emperor Xuanzong of Tang, showed it to his generals, and said to them, "The emperor has issued a secret decree ordering me to enter the court to punish Yang Guozhong; all of you must follow my commands." When the generals heard this news, they were all greatly shocked, but not a single person dared to step forward and oppose it.
An Lushan ordered Lü Zhihui, the deputy military governor of Pinglu, to defend Pinglu; Jia Xun, the deputy military governor of Fanyang, to defend Fanyang; and the general Gao Xiuyan to guard Datong, while all other commanders joined him on the campaign. In addition to his own troops, he also mobilized forces from the Khitan and Xi tribes, totaling 150,000 men—though he claimed 200,000—and marched southward through the night. The next day, An Lushan reviewed his army and held a rally, using the pretext of punishing Yang Guozhong to continue his southward advance.
At that time, the Central Plains region had long enjoyed peace and prosperity, having experienced no wars for many years. When news spread that An Lushan had raised an army in Fanyang, many officials were terrified out of their wits and abandoned their cities to flee for their lives. As a result, the rebel forces advanced with great ease, taking only thirty-five days to enter Henan territory and capture the eastern capital, Luoyang.
In 756 AD, An Lushan declared himself emperor in Luoyang, establishing the Great Yan dynasty. He then sent forces to attack Chang'an, where the Tang defenses were weak, forcing Emperor Xuanzong to flee hastily to Chengdu with his beloved consort Yang Yuhuan.