Republic of Formosa
In 1891, he was dismissed from all official positions and settled in Shanghai. Following China's defeat in the First Sino-Japanese War, he served as foreign minister of the short-lived Republic of Formosa.