Ultimately, the emperor purged and executed Li along with his extended family and thirty thousand others, accusing him of supporting treason.
[5][6] Li planned the organization of the six ministries, helped draft a new law code, and supervised the compiling of the History of Yuan, being the Ancestral Instructions and the Ritual Compendium of the Ming Dynasty.
His reward and punishment system was influenced by Han Feizi, and Li Shanchang had a kind of secret police in his service.
[8][5] One history holds that, after the navy in Chaohu surrendered to the emperor, Li urged ferrying the soldiers to capture the southern area of the Yangtze River.
[citation needed] The emperor asked Li to assume responsibility for administrative affairs in 1353,[7][9] granting him overall institutional authority long before codification work started.
Hongwu ordered Li and others to create the basic law code in 1367, appointing him Left Councilor and chief legislator in a commission of 30 ministers.
[10] Following the drafting of the code, Li personally oversaw any new stipulations,[11] including a system of fixed statutes made to combat corruption.
[1] In old age, Li retired as the emperor's distaste grew for his arrogance, but was still recalled to deliberate military and dynastic affairs.