According to legend, in A.D. 1253, Mongo Khan ordered Kublai Khan, the warehousing king, to lead a hundred thousand troops into Yunnan, and Wan Li attacked Yunnan, crossing the Jinsha River and pacifying Yunnan. Since then, Kublai Khan named his grandson Ma as the representative of Yuan's kingship in Yunnan, saying.
At the end of the Yuan Dynasty, the Yuan Dynasty in the Central Plains had been destroyed by Zhu Yuanzhang, and the Ming army was going to attack Yunnan. In order to fight against the Ming army, the fourth generation of Liang King Bazanan Nabal Mi took a fancy to this mountain because of its dangerous terrain, broad vision, dense grass and fertilizer, and easy to defend but difficult to attack. He set up large and small military teaching fields in the gentle mountainous area on the north side of the main peak, and stationed training. In the Caihuaping Garden under the north side of the main peak, vegetables will be planted, and infrastructure such as racetracks, gardens, pavilions and temples will be built. There are people in the depths of Baiyun Mountain in Liangwangshan, smoke from cooking stoves is curling, cattle are ringing leisurely, and shepherds and woodcutters shout in high tones. At that time, Yunnan paid tribute to 2,500 fine horses in the Yuan Dynasty every year, and later paid tribute to Liang Wang. On the mountain, it built a military fortress, a palace yamen, a golden palace in Liang Wang, a large, medium and small teaching field, and a garrison camp. It also raised some horses and built a pool to drink horses. Today's Yinmachi Village Committee is named after this. Thus, 18 competes with each other. 1375 after Liang Wang's defeat, more than 200 people in his family were all martyred, which was shocking and embarrassing.
During this period, King Liang collected the gold, silver and jewels of Kunming Palace and hid them in the caves of Liangshan, Damon, forming mysterious stories and legends with 99 barrels of gold, 999 barrels of silver and several generations of prisoners. Because Liang Wang and his men have been stationed here for a long time, their activities spread all over the mountain area, and later they were called Liang Wang.