Lu Shang was born in 789, during the reign of Emperor Dezong. His family was from "The second house of northern ancestry" of the prominent Lu clan of Fanyang. Lu Shang's grandfather Lu Ang served as a prefectural prefect, and his father Lu Guang served as the sheriff of Henan County, one of the two counties making up the Tang eastern capital Luoyang. Lu Shang lost his father early in life and was said to be poor, but studious. He passed the imperial examinations in the Jinshi class in 809, during the reign of Emperor Dezong's grandson Emperor Xianzong, and further passed a special examination for those who made good rulings. He was initially made Xiaoshu Lang, a copyeditor at the archival ministry. When the official Fang Chuanshi served as the governor of Xuanshe Circuit, Lu served as his assistant. Lu later served as a secretary under successive military governors of Xichuan Circuit, the former chancellors Wang Bo and Duan Wenchang. Lu was later recalled to the capital Chang'an to serve as Gongbu Yuanwailang, a low-level official at the ministry of public works, and then as the magistrate of Henan County. He later served three terms as supervisory officials at the ministries — Gongbu Langzhong, at the ministry of public works; Duzhi Langzhong, at the ministry of census ; and Sifeng Langzhong, at the minister of civil service affairs.
During Emperor Wenzong's and Emperor Wuzong's reigns
In 835, during the reign of Emperor Xianzhong's grandson Emperor Wenzong, Lu was made the deputy mayor of Jingzhao Municipality and acting chief judge of the supreme court. Early in Emperor Wenzong's Kaicheng era, he was sent out of the capital to serve as the prefect of Su Prefecture. Su Prefecture was a salt-producing prefecture, but at that time, the regulations on the sale of salt was complex, and the administrators were using this opportunity to embezzle profits from the fishermen who produced salt. When Lu reached Su Prefecture, he met with the fishermen personally and simplified the regulations, allowing them to sell as much salt as they could properly produce, rather than set quotas, and this benefited the people greatly. It was said that, as a result, the taxation the government received from the salt monopoly at Su Prefecture was doubled. Li Shi the chancellor in charge of the monopoly at the time was impressed, and he had Lu made the governor of Zhexi Circuit, as well as the prefect of its capital Run Prefecture in 837. Later, Lu was recalled to be the deputy minister of justice, and then the mayor of Jingzhao. In 843, when Emperor Wenzong's brother and successor Emperor Wuzong was conducting a campaign against the warlordLiu Zhen, Lu served as the deputy minister of census and acting director of finances, and also was in charge of supplying the troops. It was said that as a result of his work, the army did not lack supplies. After Liu was defeated, Lu was made the military governor of Dongchuan Circuit.
During Emperor Xuānzong's reign
In 846, after the death of Emperor Wuzong and succession by his uncle Emperor Xuānzong, Lu was recalled to Chang'an to serve as the deputy minister of defense. He also again served as acting director of finances. Later that year, he was made Zhongshu Shilang, the deputy head of the legislative bureau of government and chancellor de facto with the designation Tong Zhongshu Menxia Pingzhangshi. He was also created the Duke of Fanyang. Lu did not serve long as chancellor, however. In 847, during the middle of a drought, which were often viewed as signs of divine displeasure over overly severe punishment, Emperor Xuānzong had Lu and the deputy chief imperial censor Feng Ao review the cases of the prisoners held at Chang'an. Lu and Feng apparently advocated for commutation of many death sentences, but then-chief judge of the supreme court, Ma Zhi, objected, and submitted a petition to Emperor Xuānzong arguing that that leniency would have the opposite effect of drawing further divine displeasure. Due to the machinations of Lu's fellow chancellor Bai Minzhong, Emperor Xuānzong approved Ma's petition, and soon thereafter, Lu was removed from his chancellor position and made the military governor of Wuchang Circuit. In 859, Lu was suffering from an illness, and he submitted a petition requesting a replacement. Emperor Xuānzong recalled him to Chang'an to serve as minister of census. Later that year, though, before Lu could reach Chang'an, he died at Hanyin.