Wei Yuan (Chinese: 魏源; pinyin: Wèi Yuán; Wade–Giles: Wei Yüan, April 23, 1794—March 26, 1857), born Wei Yuanda (魏远达), courtesy names Moshen (默深) and Hanshi (汉士), was a Chinese scholar from Shaoyang, Hunan. He moved to Yangzhou in 1831, where he remained for the rest of his life. Wei obtained the provincial degree (juren) in the Imperial examinations and subsequently worked in the secretariat of several prominent statesmen, such as Lin Zexu. Wei was deeply concerned with the crisis facing China in the early 19th century; while he remained loyal to the Qing Dynasty, he also sketched a number of proposals for the improvement of the administration of the empire.
From an early age, Wei espoused the New Text school of Confucianism and became a vocal member of the statecraft school, which advocated practical learning in opposition to the allegedly barren evidentiary scholarship as represented by scholars like Dai Zhen. Among other things, Wei advocated sea transport of grain to the capital instead of using the Grand Canal and he also advocated a strengthening of the Qing Empire's frontier defense. In order to alleviate the demographic crisis in China proper, Wei also spoke in favor of large scale emigration of Han Chinese into Xinjiang.
Later in his career he became increasingly concerned with the threat from the Western powers and maritime defense. He wrote A Military History of the Qing Dynasty (圣武记, Shèngwu Ji) and a narrative work on the Opium War (道光洋艘征抚记, Daoguang Yangsou Zhengfu Ji). Today, he is mostly known for his 1844 work, Illustrated Treatise on the Maritime Kingdoms (海国图志, Haiguo Tuzhì), which consists of Western material collected by Lin Zexu during and after the First Opium War.