Born in Minhou in Fujian province, he obtained the highest degree in the imperial examinations in 1847 and was soon appointed to the Hanlin Academy.
His great administrative abilities attacted the attention of Zeng Guofan, who enlisted him in the effort to suppress the Taiping Rebellion. Following the suppression of the rebellion in 1864, Shen became actively involved in the Self-strengthening movement and later worked on the shipyard in Fuzhou.
He also took part in obtaining a peace settlement with Japan, following the Japanese in 1874. Then he was appointed as the Viceroy of Liangjiang in 1875 and died in 1879 during the post.
In late 1864, Shen commited the governor of Jiangxi had been checked on pass and discovered giant treasure's transport back to Hunan by many boats from Xiang Army occupied Nanjing involved.
Shen was married to Lin Puqing , the daughter of Lin Zexu.