Sun was born in Hangzhou, Zhejiang Province in 1867, the eldest son of Sun Yijing, assistant Imperial tutor to the Xianfeng Emperor of the Qing Dynasty. He received a classical Chinese education and was awarded the title of second grade yinsheng. He then married a relative of Yikuang, the future Prince Qing. In 1886, Sun became a junior secretary of the Board of Punishments, a post he held until 1895. He was listed for assignment to a foreign post in 1898, but his appointment was delayed because of the Boxer Rebellion. In 1902, he briefly served as secretary of legation in Vienna, Berlin, and Paris, was then appointed Minister to France. Sun returned to China in 1906 and became chief secretary of the Grand Council, which was tasked with reorganizing the country's administrative system. In 1907, he became Minister to Germany. In January 1909, Sun was appointed assistant director of the Tianjin-Pukou railroad, and in June of that year he was appointed governor of Shandong Province. Sun was a supporter of constitutional government for China. In 1910, he urged the imperial authorities that a cabinet system be established, and in 1911 he recognized the independence of Shandong from Manchu rule. However, after Yuan Shikai secured power, Sun was forced to retract this declaration and resign. After the end of the Qing Dynasty in 1912, Sun briefly entered a private business enterprise with Prince Qing, but was quickly drawn back into government as co-director general and later acting director general of the Customs Administration. On September 11, 1913, he was appointed to Premier Xiong Xiling's cabinet, and negotiated an agreement with Russia by which Russia recognized China's suzerainty over Outer Mongolia and China recognized Outer Mongolia's autonomy. When Xiong resigned in mid-February 1914, Sun became acting Premier until Xu Shichang assumed office in May. Sun served as minister of foreign affairs until January 1915, until he resigned in protest of Japan's Twenty-One Demands. From this point on, Sun occupied primarily economic posts, as opposed to his previous foreign policy work. In January 1916, Sun became director of the bureau of audit, and in April minister of finance. In 1917 he was appointed director general of the Customs Administration and in 1920 became director of the economic administration bureau. He then became chairman and later director general of the famine relief bureau, as well as vice-chairman of the Yangtze River commission. In January 1924, Sun briefly became premier a second time, but resigned in July after friction with finance minister Wang Komin. After stepping down, Sun became chairman of the foreign affairs committee and refused several other postings before becoming president of the Hanyepingiron and steel complex and the China Merchants' Steam Navigation Company. In 1926, he was appointed general director of Sino-French University, and in 1928 he retired to Dairen when the Northern Expedition reached Peking in 1928. In 1929, Sun traveled to Hong Kong for treatment for a chronic intestinal disorder, and traveled to Shanghai and Hangzhou in 1930. His illness worsened soon after and he died on February 3, 1931.