Wei Yan () (died 234), courtesy name Wenchang, was a military general of the state of Shu Han during the Three Kingdoms period of China. Originally a subordinate of the warlord Liu Bei in the late Eastern Han dynasty, Wei Yan rose through the ranks and became a general when Liu Bei seized control of Yi Province (covering present-day Sichuan and Chongqing) in 214. His performance in battle helped him to become a prominent figure in the Shu military in a short period of time. He was later appointed as the Administrator of Hanzhong Commandery and as an Area Commander in 219. Between 228 and 234, he participated actively in the Northern Expeditions led by the Shu regent Zhuge Liang against Shu's rival state, Cao Wei. After Zhuge Liang's death in 234, Wei Yan was killed by another Shu general, Ma Dai, for alleged treason.