He hailed from Dingtao 定陶 (modern Dingtao, Shandong) and studied the Confucian Classic Yijing 易經 "Book of Changes" when he was a young man. Emperor Zhao 漢昭帝 (r. 87-74 BCE) was impressed by his colloquial abilites and first appointed him magistrate (ling 令) of Maoling 茂陵, then governor (taishou 太守) of the commandery of Henan 河南. In this position be became famous for his efforts in suppressing the local gentry's increased seizure of official land. General Huo Guang 霍光 therefore had him arrested with some charge, and he was only released after one year.
Soon he was promoted to regional inspector (cishi 刺史) of Yangzhou 揚州, a position that he filled with the utmost care, which created him a lot of enemies. He was therefore called back to the court, where he was appointed Grand master of remonstrance (jian dafu 諫大夫), and then back to governor of Henan.
During the reign of Emperor Xuan 漢宣帝 (r. 74-49 BCE) he was appointed Chamberlain for the National Treasury (dasinong 大司農), then Censor-in-chief (yushi dafu 御史大夫). As a such, he submitted a memorial to the emperor warning him against the growing power of the family Huo. For this memorial he was granted the title of palace steward (jishizhong 給事中), which allowed him to enter the private part of the imperial palace and to take part in government decisions.
In 67 BCE he succeeded Wei Xian 韋賢 as Counsellor-in-chief (chengxiang 丞相) and was concurrently appointed Marquis of Gaoping 高平侯. In 64 BCE the steppe federation of the Xiongu 匈奴 attacked the military agro-colonies (tuntian 屯田) of Cheshi 車師, so that Emperor Xuan planned an expedition against the Xiongnu, yet Wei Xiang warned against such a campaign because the economic condition of the empire was not favourable for a war.
He also suggested to undertake an empire-wide search for competent worthies that could be used for posts in the administration. Wei Xiang also promoted the increase of revenues and the stockage of grain in the imperial granaries. He died in office. His posthumous title is Marquis Xian 憲侯.