In the fifth and seventh years of Guangxu (1879- 188 1), Ding Mu entered Li Hongzhang's curtain to inspect Tianjin's coastal defense project and participate in coastal defense affairs. After he was reinstated after the expiration of the Shouzhi period, he repeatedly criticized the failure of state affairs, impeached the minister, and dismissed Wang Wenshao, the minister of the Ministry. Guangxu eight years (1882) was appointed as the left deputy capital of imperial academy, and then impeached and dismissed several dereliction of duty officials, which shook up and down. As a result, he became "the most famous and taboo clean party member". In May of the following year, he was promoted to Bachelor of Lectures. From the first year of Guangxu to the tenth year (1875- 1884), a total of 127 pieces were played, of which one third were impeached ministers and directly remonstrated. At that time, the dispute between China and France had started, and Zhang Peilun demanded the development of the navy and the establishment of four towns of the South Beiyang Navy to guard against it; Liu Yongfu's Black Flag Army was invited to strengthen its forces. The Qing court hated him for obstructing the peace talks and ordered him to work in Shaanxi. After returning to Beijing, I walked in the yamen of the Prime Minister, arguing repeatedly in foreign negotiations and confronting the unreasonable demands of foreign governments. Parkes, the British minister, put pressure on the General Administration with the "Shamian Incident" to forbid China to punish the murderer and strike a table and growl. Zhang Peilun immediately slapped the table and asked, "You caused the war between the two countries. Do you want to do it again? " After that, China lodged a formal protest with Britain.
Ten years (1884), Prince Gong? Others were removed from the military department and the General Administration of Peace by the Western Empress Dowager, and Zhang Peilun tried to save them. As a result, he was at odds with the Qing court and made too many enemies in Korea, which made him lose power in politics. As Sino-French relations were tense, he was sent to Fujian to deal with maritime affairs, and was later appointed Minister of Shipping.