In the last years of the Sui Dynasty, the people complained bitterly, so there were rumors that the Sui Dynasty was about to be annexed by the Li surname, so the Sui Emperor began to attack the imperial court and the officials or people surnamed Li. At that time, Li Yuan knew that after he pretended to be crazy and stupid to escape the disaster, but Li Mi was not so lucky, his father was originally a heavy minister of the imperial court, but the Sui Emperor ordered that Li Mi should not be allowed to serve as an official of the imperial court. Li Mi's father and ancestors were all important ministers of the imperial court for three generations, which can be described as the fourth and third dukes, after Li Mi's father died, and he was ostracized by the imperial court, and finally Li Mi resigned from his official position to escape the catastrophe.

After Li Mi began to live in seclusion, he relied on his father to leave his old book to live, so his life was very simple, he would herd cattle every day, but he never forgot to read, and his diligence eventually met Yang Su. At that time, Yang Su went out on an outing but met Li Mi, seeing That Li Mi was so diligent in reading, Yang Su asked who was reading, and Li Mi immediately went down to visit Yang Su, because he had met Yang Su when Li Mi was a palace guard, so he knew Lord Yang Su. During the conversation, Yang Su was amazed by Li Mi's profound knowledge and let his son get acquainted with Li Mi to learn together.
When the Sui Emperor sent troops to attack Goguryeo, Yang Xuangan knew that the time had come, so he led his army to rebel. Yang Xuangan lacked the talent of a general, and he immediately thought of Li Mi, who had been living in the mountains and forests for a long time, so he sent someone to take Li Mi to the military camp to discuss the important matters of the Rebellion against the Sui Army. After Li Mi arrived at the military camp, he proposed three strategies to Yang Xuangan, and Yang Xuangan took Luoyang because of this strategy, and also captured the Sui Dynasty minister Wei Fusi. Yang Xuangan was very important to Wei Fusi, and deliberately let Wei Fusi divide Li Mi's original power equally, and from then on, it was no longer Li Mi who had the final say in the military camp. Although Wei Fusi was in Yang Ying, his heart was still toward the Sui Dynasty, and eventually Wei Fusi fled Yang Xuangan's army.
Later, the Sui Dynasty army attacked Yang Xuangan, and Yang Xuangan insisted on taking the Hongnong Palace, but Li Mi repeatedly advised that the Sui Dynasty army was coming, and the plan for the present was to retreat to Tongguan and prepare for a long-term confrontation with it, but Yang Xuangan just did not listen, and finally he led the army to attack the Hongnong Palace, and Li Mi also retreated to Tongguan, Yang Xuangan did not fail to capture the Hongnong Palace for three days, and finally the Sui army arrived, and Yang Xuangan was defeated and killed. Although Li Mi retreated to Tongguan, because most of his troops were led by Yang Xuangan, Tongguan was also breached at once, and Li Mi was immediately captured.
Li Mi escaped during the escort, and Li Mi defected to Wagangzhai. At that time, Wagangzhai was only a settlement of mountain thieves, and Li Mi was very appreciative of him when he arrived at Hou Zhai Rang, and under Li Mi's advice, the Wagang army continued to grow, and from the hairy mountain thieves, they also became the rebel army that commanded the world. The gorgeous transformation of Wagangzhai is inseparable from Li Mi, and Zhai Rang has great admiration for Li Mi, so when he went to fight Wang Shichong, because of Li Mi's timely intervention, Zhai Rang was saved.
Therefore, Zhai Rang wanted to give the command of the Wagang army to Li Mi, but this matter was blocked by Zhai Rang's brother, and after Li Mi learned of this, he invited Zhai Rang's brother to drink in the tent, but Li Mi ordered someone to kill their brother, and li Mi had absolute control over the Wagang army from then on. However, this incident also caused the military instability of the Wagang army, and eventually was defeated by the Sui army, Li Mi fled again, and he later defected to Li Yuan's military camp, and Li Yuan married his cousin to him in order to win him over. Li Mi always wanted to be a leader, how he was willing to be a general in Li Yuan's military camp, so he took the opportunity to escape, but he was chased and killed by the Tang army, Li Mi finally did not escape from the siege of the Tang army, Li Mi was shot by the archers of the Tang army and died on the battlefield.