Little is known about Xue Lang's background, as there was no biography for him in any of the official histories. The first historical reference to him was in spring 887, when he was serving as a collector under Zhou Bao the military governor of Zhenhai Circuit, in Zhou's role as deputy director of salt and iron monopolies. By that point, Zhou was said to be devoting his time to pleasure, not paying attention to governance. He was also conscripting the laborers to build outer walls for the circuit capital Run Prefecture, as well as an eastern addition to his mansion. The people resented the heavy labor. To protect himself, he organized a new corps, known as the Rear Tower Corps, paying them twice the salary of regular troops, and this caused much resentment among the regular troops. Once, when Zhou was feasting with his staff, staff members expressed to him their concerns about the regular troops' resentment. Zhou responded, "If they dare to create disturbances, execute them." When his staff member Xue Lang informed this to Xue's friend, the officer Liu Hao to warn Liu, Liu stated, "We can only escape death if we mutiny." That night, Liu started a mutiny with his soldiers and attacked Zhou's mansion. Zhou woke up and tried to summon the Rear Tower Corps to fight the mutineers, but soon found out that the Rear Tower Corps had joined the mutineers. He could not think of another way to counter the mutiny, so he took his family members and fled on foot to Chang Prefecture to join Ding Congshi. Liu killed many of Zhou's staff members, took over the headquarters, and supported Xue as the acting military governor. Because Zhou was previously the deputy director of the monopolies, he had much wealth stored away, and it all fell into the mutineers' hands.
Defeat and Death
However, Xue Lang's takeover of the circuit was not uncontested. Qian Liu the prefect of Hang Prefecture, did not recognize Xue and launched an army under the command of his subordinates Du Leng, Ruan Jie, and Cheng Ji to attack Xue. In winter 887, Ruan captured Zhenhai's capital Run Prefecture and seized Xue; he took Xue back to Hang Prefecture. In spring 888, Qian executed Xue and cut out his heart to sacrifice it to Zhou Bao.