Zhang Liang ( Tang Dynasty ) Zhang Liang ( 張亮 ) ( died April 17 , 646 ) was a general and official of the Chinese dynasty Tang Dynasty , becoming chancellor late in the reign of Emperor Taizong . He was eventually accused of using witchcraft — a major taboo during China ' s imperial times — and executed in 646 . Background and service under Li Mi . It is not known when Zhang Liang was born . He was from Zheng Province ( 鄭州 , roughly modern Zhengzhou , Henan ) , and it was said that his family was not of a noble lineage . Early in his life , Zhang was a farmer , but was said to have great expectations . He was also said to be appearing to be honest and meek outwardly , but instead was treacherous inside . At the end of Sui Dynasty , the rebel ruler Li Mi conquered Zhang ' s home region , and Zhang followed him . Initially , he was not regarded highly by Li Mi , but after he revealed a treasonous plot to Li Mi , Li Mi believed him to be faithful , and so made him a general and had him serve under the major general Xu Shiji . In 618 , Li Mi was defeated by the Sui general Wang Shichong , and he fled to Tang Dynasty territory and surrendered to Tang . The parts of the territory formerly under Li Mi ' s control was still under Xu ' s control , and Xu , because Li Mi had already submitted to Tang , decided to submit to Tang as well — a decision that Zhang supported . During Emperor Gaozu ' s reign . After the submission of Xu Shiji ( who later would be bestowed the imperial clan name of Li and be known as Li Shiji ) to Tang , Zhang Liang was made the governor of Zheng Prefecture . However , around the same time , Wang Shichong captured Zheng Prefecture , and Zhang had nowhere to go , and instead took up guerilla warfare in the region . Later , based on recommendations by Li Shiji and Fang Xuanling , Tang ' s major general Li Shimin the Prince of Qin ( a son of Emperor Gaozu ) invited Zhang to serve on his staff , and Zhang eventually became a trusted advisor . By 626 , Li Shimin was locked in an intense rivalry with his older brother Li Jiancheng the Crown Prince , and he considered actions to take . As Li Shimin contemplated the possibility that he might eventually need to seize Luoyang to serve as a basis of operations against Li Jiancheng , he sent Zhang to Luoyang , with several thousand men , to secretly plan for that possibility , and to distribute wealth to get people to join Li Shimin ' s cause . However , this was discovered by Li Shimin ' s younger brother Li Yuanji the Prince of Qi , who supported Li Jiancheng , and Li Yuanji accused Zhang of treason . Zhang was briefly put under arrest , but under interrogation refused to reveal Li Shimin ' s instructions to him , and with insufficient evidence against himself , he was released and allowed to return to Luoyang . Later that year , after Li Shimin ambushed Li Jiancheng and Li Yuanji at Xuanwu Gate and killed them , he effectively forced Emperor Gaozu to create him crown prince and then yield the throne to him ( as Emperor Taizong ) . During Emperor Taizong ' s reign . For Zhang ' s contributions , Emperor Taizong created him the Duke of Changping and made him the commandant at Huai Prefecture ( 懷州 , roughly modern Jiaozuo , Henan ) . In 631 , he was made the imperial censor , and then the minister of palace supplies . He was also created the greater title of Duke of Yu . He served several times as commandants , and in 633 , when Emperor Taizong made his favorite son Li Tai the Prince of Wei the commandant at Xiang Prefecture ( 相州 , roughly modern Handan , Hebei ) but did not actually send Li Tai to Xiang Prefecture , Zhang was made the secretary general at Xiang Prefecture and effectively the commandant . In 637 , his title was changed to Duke of Xun . It was said that when Zhang was at a prefectural post , he would send his subordinates to secretly investigate who are the good and who are the evil people of the locale , allowing him to punish the evil and discover the good . He was also praised for suppressing the local bullies and helping the weak . However , it was also said that he divorced his wife and married a Lady Li as his new wife . Lady Li was said to be promiscuous and jealous , but was greatly favored by Zhang . When they went to Xiang Prefecture , there was a young man who sold pens for a living and was good at singing and dancing . Lady Li carried on an affair with the young man , and , falsely declaring that Zhang had previously carried on an affair with the young man ' s mother , encouraging Zhang to adopt the young man as a son , to be named Zhang Shenji ( 張慎幾 ) - - an act opposed by Zhang ' s son , by his former wife , Zhang Shenwei ( 張慎微 ) , to no avail . It was also said that Lady Li favored witchcraft , engaging many witches , and interfered with Zhang ' s administration , and from that point on , Zhang ' s reputation began to suffer . In 640 , Zhang was recalled to the capital Chang ' an to serve as the minister of public works . In 641 , he was made the head of the household for Emperor Taizong ' s son and crown prince Li Chengqian , but was also sent out of the capital to serve as the commandant at Luo Prefecture ( 洛州 , i . e . , Luoyang ) . The general Hou Junji , who was unhappy that he had been briefly imprisoned on accusations of embezzlement after he conquered Gaochang , tried to instigate Zhang by asking him , " Who squeezed you out ? " Zhang , in jest , responded , " Other than you , who can squeeze me out ? " Hou responded , " I conquered a kingdom , but I ran into someone throwing a tamper tantrum big enough to overturn a house . What strength do I have to squeeze you out ? " He then rolled up his sleeves and yelled , " I am so unhappy that I would rather die . Do you want to commit treason ? I will commit treason with you ! " Zhang secretly reported this exchange to Emperor Taizong , but Emperor Taizong pointed out that this was a private conversation with no corroboration , and took no action on it . After Hou was revealed to have plotted with Li Chengqian to overthrow Emperor Taizong in 643 , Li Chengqian was deposed and exiled , while Hou was executed . Because Zhang had previously warned Emperor Taizong about Hou , Emperor Taizong rewarded him by recalling him to the capital to serve as the minister of justice and also bestowing him the additional designation of " Canyu Chaozheng " ( 參豫朝政 ) , making him a " de facto " chancellor . ( Earlier in 643 , when Emperor Taizong commissioned the Portraits at Lingyan Pavilion to commemorate the 24 great contributors to Tang rule , Zhang ' s was one of the portraits commissioned . ) In 644 , when Emperor Taizong planned a major campaign against Goguryeo , Zhang repeatedly advised against it , but Emperor Taizong did not accept his advice . Zhang himself thereafter requested to be a general on the campaign , and he was put in charge of the 40 , 000 soldier fleet that would depart from Lai Prefecture ( 萊州 , roughly modern Yantai , Shandong ) to head directly toward the Goguryeo capital Pyongyang . In summer 645 , Zhang ' s fleet attacked and captured Bisa ( 卑沙 , in modern Dalian , Liaoning ) , and then headed to the mouth of the Yalu River in anticipation of the army also arriving there . When his forces subsequently marched past Geonan ( 建安 , in modern Yingkou , Liaoning ) , Goguryeo forces made a surprise attack against his forces — shocking him so much that he froze , but his failure to react was interpreted by his own soldiers to be a show of resolve and bravery , and his assistant Zhang Jinshu ( 張金樹 ) subsequently counterattacked and repelled the Goguryeo attack . Later , however , when Emperor Taizong ' s own main forces became bogged down in sieging Ansi ( 安市 , in modern Anshan , Liaoning ) and was eventually forced to abandon the offensive with winter arriving , Zhang withdrew as well . Death . Meanwhile , over the years , Zhang had taken some 500 men and called them his sons . He had also become very trusting of sorcerers named Cheng Gongying ( 程公穎 ) and Gongsun Chang ( 公孫常 ) , whose brother Gongsun Jie ( 公孫節 ) was one of Zhang ' s " sons . " Both Cheng and Gongsun flattered Zhang by suggesting that one day he would be emperor . In 646 , one Chang Dexuan ( 常德玄 ) reported to Emperor Taizong these things and suggested that Zhang was plotting treason . Emperor Taizong had the chancellor Ma Zhou investigate , and , although Cheng and Gongsun Chang admitted the allegations , Zhang denied the allegations , stating that Cheng and Gongsun only admitted because they wanted to be spared . Emperor Taizong , however , believed that Zhang was plotting with his 500 " sons . " Most officials also advocated Zhang ' s death ; only Li Daoyu ( 李道裕 ) the deputy minister of construction opposed , stating , " There is no firm evidence that Zhang was committing treason , and he should not be put to death . " Emperor Taizong executed Zhang and Cheng , but later regretted it , and due to his regrets , he promoted Li Daoyu to the post of deputy minister of justice .