When they arrived at Liangshan Marsh, they saw all 108 heroes, including Chao Gai and Song Jiang, gathered in the Loyalty Hall. Chao Gai and Song Jiang came down from the hall to welcome him, saying, 'We have long heard of the great fame of the Jade Unicorn. To meet you today is truly a blessing for our stronghold!' They held a feast to entertain him, offering fine wine and good meat. Lu Junyi saw that these outlaws treated him with such courtesy and that they were all gallant heroes of the rivers and lakes. Though startled, he could not help but admire them. Chao Gai and Song Jiang repeatedly urged him to stay, hoping to persuade him to join their ranks. Lu Junyi's heart was set on his family, property, wife, and children. He only made excuses to return home and refused to become an outlaw.
Lu Junyi stayed at Liangshan Marsh for several days. Unable to refuse their insistence, he could only agree to 'stay for a little while and come back after settling family matters.' Seeing his determination, Chao Gai and Song Jiang did not force him further and simply let him go down the mountain. When Lu Junyi and his party returned to Daming Prefecture, they found everything changed—his home was no longer as he had left it. It turned out that Li Gu, seeing that Lu Junyi had been away for a hundred days, had committed adultery with Lu Junyi's wife, Pan Jinlian, and seized control of the family wealth.
Li Gu and Pan Jinlian conspired together, embellishing Lu Junyi's time at Liangshan Marsh and reporting it to the authorities in Daming Prefecture. Li Gu also used the rebellious poem written by Wu Yong as false evidence, claiming it proved Lu Junyi was colluding with Liangshan to rebel. Liang Zhongshu, the imperial commissioner of Beijing, was furious upon receiving the accusation and immediately sent soldiers to arrest Lu Junyi.
Lu Junyi was thrown into jail and endured extreme torture in Daming Prefecture. To curry favor with his father Cai Jing, Liang Zhongshu intended to have Lu Junyi convicted and executed. Fortunately, Yan Qing was alert. Noticing something unusual at the Lu residence, he secretly investigated and learned the full truth. Seizing an opportunity, Yan Qing disguised himself and traveled through the night to Liangshan Marsh, reporting Lu Junyi's wrongful imprisonment to Song Jiang and Chao Gai. When the people of Liangshan Marsh heard the news, they were all shocked and enraged, vowing to go down the mountain and rescue Lu Junyi.
It is said that in the Loyalty Hall, Song Jiang learned that the Jade Unicorn, Lu Junyi, had been framed by Li Gu and imprisoned in Daming Prefecture, his fate uncertain. Worried, Song Jiang sent Dai Zong and Li Kui to Daming Prefecture to gather intelligence.