During the Yongzheng period, the imperial power gradually became stronger, and the Military Aircraft Department was established to replace the cabinet as the central government. {Zhang Tingyu} relied on the talent and knowledge accumulated in three dynasties and the cautious way of life to reach the position of chief military minister. He assisted Yongzheng in promoting the idea of dividing people into acres and returning fire to the public, rectifying the administration of officials, filling the national treasury, and helping the Qing Dynasty enter its heyday. At the same time, he spent decades presiding over the compilation of "History of the Ming Dynasty", chronicling the rise and fall of the previous dynasty with his pen. However, after Qianlong ascended the throne, the political opinions of the emperor and his ministers gradually began to diverge. Zhang Tingyu, who was over seventy years old, was demoted from his official position and seized the title, and his later life was miserable. It was not until he died of illness that Qianlong remembered his lifelong achievements, regained his title and was admitted to the Xianliang Temple. His life was a witness to the prosperous times of Kangxi and Qianlong, and he was also the epitome of the ups and downs of powerful officials in the feudal dynasty.