In October 1913, Cai E resigned as governor of Yunnan and came to Beijing. He is talented and prestigious, and is an influential figure outside the Beiyang Department. After arriving in Beijing, Yuan Shikai successively appointed him as the chief editor of the Ministry of War, supervised by the National Economic and Border Bureau, commanding office clerk, member of the political conference, and member of the Political Council, and was given the title of General Zhaowei. So many titles are only awarded to high-ranking officials and do not give real power. This reflects Yuan Shikai's attitude of being suspicious and afraid of him but having to pretend to be important.
Cai E himself once had some illusions about Yuan Shikai. After arriving in Beijing, he discovered the conspiracy and ambition of the Yuan family and his son, witnessed the perverse behavior of the Yuan family's small court, and gradually became dissatisfied with Yuan.
In May 1915, the Yuan government accepted the "Twenty-One Measures" proposed by Japan. In August, a preparatory committee headed by Yang Du was established, and Yuan Shikai's ambition to become emperor was exposed to the world. On the second day, Cai E went to Liang Qichao's home in Tianjin to secretly discuss countermeasures. Soon after, Liang Qichao's famous article "The So-Called Issues with the National System" was published, which made Yuan Shikai pay more attention to Cai E and secretly sent people to search his house in October. Under this situation, Cai E pretended to be depressed, frequented the eight alleys in the capital, and even pretended to support the imperial system, but secretly sent his family members back to their hometowns to prevent accidents. On November 11, Cai E, who had contracted a throat disease, pretended to be cured and went to Tianjin to discuss the anti-Yuan plan with Liang Qichao and to contact his old friends in Yunnan. On November 19th, he changed his name to cross-dressing and traveled to Japan via Hong Kong, arriving in Kunming on December 21st.
At that time, the Yunnan military circles had already held a secret meeting, and a small number of troops went north to Sichuan. Li Liejun, Fang Shengtao and others also arrived one after another. However, Tang Jixun, the governor of Yunnan, had an ambiguous attitude, so Yunnan was delayed in moving. After Cai E arrived in Yunnan, he discussed with Tang Jixun nine times and did a lot of ideological work for his subordinates, and finally decided to revolt. On December 25, 1915, Cai E, Tang Jixun, Ren Kecheng, Liu Xianshi, and Dai Kan jointly sent a telegram to denounce Yuan Shikai and declare Yunnan's independence. On the 26th, the National Defense Army was formally established in Yunnan. Cai E was appointed commander-in-chief of the 1st Army and marched north to Sichuan; Li Liejun was appointed commander-in-chief of the 2nd Army and sent troops to Hunan and Guangdong; Tang Jixing served as the governor of Yunnan and concurrently served as the commander-in-chief of the 3rd Army and was stationed at the base camp. Among them, the 1st Army led by Cai E was the main force, and its situation was also the most difficult. They used thousands of people to resist the well-equipped Beiyang Army of more than 10,000 people, with a huge disparity in strength. However, due to favorable conditions such as terrain and climate, and the support and support of the local people, they were able to continue to win. At this time, Cai E had a serious throat disease, his voice was hoarse, and his face was haggard, but he took the lead and fought bravely. Under his command, after two months of hard fighting, the Beiyang Army in Sichuan was finally defeated. In this way, Yuan Shikai, under pressure from the whole country, announced the abolition of the imperial system on March 22, 1916, but still wanted to retain his status as president. Cai E and others insisted on Yuan Shikai's resignation. On May 8, 1916, the five provinces of Yunnan, Guizhou, Guangxi, Guangdong and Zhejiang established the Military Affairs Council in Zhaoqing, Guangdong. Cai E and 15 other people were promoted to Fujun. On June 6, Yuan Shikai died amid nationwide condemnation. On June 7, Li Yuanhong succeeded him in accordance with the law and appointed Cai E as the governor of Sichuan and the governor of the province.
Cai E's condition was very serious at this time. He recommended Luo Peijin and Dai Kan to act as agents, resigned from the Beijing government and went abroad for medical treatment. He left Chengdu on August 9th and went to Shanghai on the 22nd to contribute to Liang Qichao's "Dunbi Collection". 》Write the preface. On September 20, Cai E arrived in Tokyo and was admitted to Fukuoka University Hospital for treatment. However, due to his severe illness, treatment failed and he died on November 8, 1916. He was only 34 years old. Under the pressure of public opinion, the Beijing government allocated 20,000 yuan and held a grand state funeral ceremony for him. Cai E's body was buried on Yuelu Mountain on the bank of the Yangtze River.