Liu Zhang sent his benefactor Pang Yi to enlist Zhang Lu in Hanzhong, but zhang Lu broke it several times, and Liu Zhang sent Pang Yi to be the taishou of Ba County, which was the missionary place of Zhang Xiu, who was attacked and killed by Zhang Lu, and after Zhang Xiu's death, the Wudou Mi Daoists in Ba County were absorbed by Zhang Lu, so zhang Lu attacked Ba County, divided Hanzhong, and used Wudou Mi Dao to educate the people and establish a theocratic regime.
At that time, the Eastern Han Dynasty was in the hands of Cao Cao, and Cao Cao had no time to take care of Zhang Lu, so he made Zhang Lu the general of Zhenyi Zhonglang, leading Han Ning Taishou, and Zhang Lu's Wudou Midao regime ruled Hanzhong for nearly thirty years.
In the sixteenth year of Jian'an, in March 211, Cao Cao sent Zhong Xuan and Xiahou Yuan's troops out of Hedong to attack Zhanglu in Hanzhong through Liangzhou, but the Kansai warlords Ma Chao and Han Sui believed that Cao Cao was looking for an excuse to annex Liangzhou, so they united with the generals in Guanzhong and raised an army of 100,000 against Cao.
Three years ago, in the thirteenth year of Jian'an, Ma Chao's father Ma Teng was persuaded by Zhang Jie to become an official in the imperial court and was appointed as a wei lieutenant by the imperial court, and Ma Chao's two younger brothers Ma Xiu and Ma Tie followed Ma Teng into the dynasty and were given the titles of Fengche Du Wei and Qi Du Wei, only Ma Chao stayed in Liangzhou and was given the title of partial general.
In July of the sixteenth year of Jian'an, Cao Cao personally led an army of 100,000 people to march west to Liangzhou, and together with the war, a large number of guanzhong and Kansai people fled to Hanzhong, which Zhang Lu had divided, in order to avoid the scourge of war, and there were tens of thousands of people who fled from the Meridian Valley into Hanzhong, Zhang Lu's strength increased greatly, and he started the idea of being king, and people who understood the color of his eyes immediately wrote to Zhang Lu, saying that they had dug up a jade seal engraved with the "King of Hanning", and Zhang Lu wanted to be king, but was persuaded by Gong Cao Yanpu.
In May of the seventeenth year of Jian'an, Cao Cao captured Ma Chao's father Ma Teng's family in Yicheng, counting three tribes and more than 200 mouths, all of whom were beheaded in Yecheng.
In the eighteenth year of Jian'an, in 213 AD, Liangzhou was defeated, Ma Chao and the general Pound De were cornered, in the spring of the nineteenth year of Jian'an, he entered Hanzhong and defected to Zhang Lu, borrowing Hanzhong soldiers and horses to counterattack Liangzhou, was blocked in Qishan, and returned without results, at this time Zhang Lu had already seen that Ma Chao was not something he could control, Ma Chao was brave, Zhang Lu thought that Ma Chao could kill his father and brother without hesitation for his own interests, Zhang Lu was afraid.
So Zhang Lu followed the method of His father Liu Yan, "evil water outside the introduction" sent Ma Chao to attack Yizhou Liu Zhang, Ma Chao Ma Meng's notoriety, Yizhou Mu Liu Zhang was heard, got the news that Hanzhong Zhang Lu sent Ma Chao to attack himself, he was frightened, and he was in a dilemma.
As early as the sixteenth year of Jian'an, Liu Zhang, in order to oppose Zhang Lu, who had just absorbed more than 100,000 Guanzhong and the power of the displaced people in Guanxi, heeded the advice of his subordinates Zhang Song and Fazheng, and welcomed Liu Bei, who had just captured Jingzhou, to lead tens of thousands of Jingzhou troops into Shu, Liu Zhang provided men and supplies, hoping that Liu Bei would attack Zhang Lu in Hanzhong.
Hearing that Zhang Lu sent Ma Chao to attack, Liu Bei sent Li Hui to persuade him to surrender, and Ma Chao also knew that Zhang Lu's own attack on Yizhou was a strategy to bring misfortune to the water, and continued to serve Zhang Lu, who did not look at him and did not trust himself, sooner or later it was a disaster to kill himself, so he took the initiative to surrender to Liu Bei.
Liu Zhang and Liu Bei turned against each other and sent an army to attack Liu Bei, Liu Bei returned to meet the attack, on the other hand, he transferred Zhuge Liang, Zhang Fei, and Zhao Yun of Jingzhou into Shu, and on both sides attacked Liu Zhang of Yizhou, and the large tribe of Yizhou fell into Liu Bei's hands, Liu Bei's army was blocked at Luocheng, and the military division Pang Tong attacked the city and died under the chaos, and the following year, Liu Bei conquered Luocheng, and joined forces with Zhuge Liang, Zhang Fei, and Zhao Yun to besiege The yizhou administrative center Chengdu, Chengdu Chenggu, Liu Bei could not attack for a long time.
At this time, Ma Chao came to vote, Liu Bei was overjoyed, secretly sent one of his own troops to Ma Chao's command, ordered Ma Chao to attack Chengdu with himself, Ma Chao used his prestige to forcibly recruit 70,000 or 80,000 Qiang people in Yizhou as a signatory army, the Tun army was in the north of the city, Liu Zhang knew Ma Chao's notoriety, heard that Ma Chao was besieging the city, his heart was afraid, and the people in the city were also afraid, ten days later, Liu Zhang opened the city and surrendered without a fight.
Liu Bei pacified Xichuan, Ma Chao Shougong, Feng Ma Chao as the general of Pingxi, Jian'an twenty-four years, in 219 AD, Liu Bei defeated Cao Cao's army left in Hanzhong and captured the whole territory of Hanzhong, in the autumn of that year, Ma Chao joined forces with more than one hundred and twenty Shu Han officials to persuade Liu Bei to become the king of Hanzhong, Liu Bei called him queen, and promoted Ma Chao to the position of general of the left, false festival.
Twenty-five years after Jian'an, in 220 AD, Peng Xian persuaded Ma Chao to rebel, Ma Chao was afraid, and denounced Peng Xian, and the following year Liu Bei declared himself emperor, established Shu Han, and enfeoffed Ma Chao as a general of the Hu Horse, a pastor of Liangzhou, and a marquis of Xunxiang, Liangzhou was Ma Chao's hometown, not a territory of Shu Han, and Ma Chao knew that Liu Bei was increasingly suspicious of himself, and he became ill, and he fell ill in December of the following year, at the age of forty-seven.
According to The Five Buckets of Rice Dao Heavenly Master Zhang Lu in Hanzhong, at this time it had been several years since cao Wei's death in Yicheng, Cao Cao personally conquered Hanzhong, although he subjugated the heavenly master Zhang Lu, but the land of Hanzhong fell into the hands of Liu Bei, zhang Lu surrendered to Cao Cao, the family moved into Yicheng, Cao Cao moved tens of thousands of households in Hanzhong into the Central Plains, with the three auxiliaries, and the Five Buckets of Rice Dao then passed into the Central Plains.