They arrived at Liangshan Marsh and saw that in the Hall of Loyalty and Righteousness, Chao Gai, Song Jiang, and all one hundred and eight heroes were assembled. Chao Gai and Song Jiang descended from the hall to welcome him, saying, 'We have long heard of the Jade Qilin's great reputation; to meet you today is truly the fortune of our stronghold!' A banquet was prepared in his honor, with fine wine and choice meats served. Lu Junyi saw that these outlaws treated him with such courtesy and were all gallant men of the rivers and lakes; though startled in his heart, he also felt admiration. Chao Gai and Song Jiang repeatedly urged him to stay, wanting him to join their band. Lu Junyi, concerned about his family, property, wife, and children, only insisted on returning home and refused to become an outlaw.
Lu Junyi stayed at Liangshan for several days, and after repeated excuses proved futile, he could only agree to 'remain for a short while, and return once family matters are settled.' Seeing his determination, Chao Gai and Song Jiang did not force him to stay and only let him leave the mountain. When Lu Junyi and his party returned to Daming Prefecture, they found everything at home completely changed. 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 usurped the family fortune.
Li Gu and Pan Jinlian conspired together, embellished Lu Junyi's stay at Liangshan Marsh, and reported it to the Daming Prefecture authorities. Li Gu also used the rebellious poem written by Wu Yong as false evidence, claiming Lu Junyi colluded with Liangshan to rebel. The Military Commissioner of the Northern Capital, Liang Zhongshu, upon receiving the indictment, flew into a rage and immediately sent troops to arrest Lu Junyi.
Lu Junyi was taken into custody and suffered terrible torture in Daming Prefecture. To curry favor with his father, Cai Jing, Liang Zhongshu wanted to convict Lu Junyi and have him executed. Fortunately, Yan Qing was observant and, noticing something amiss at the Lu residence, made secret inquiries and thus learned the full details. Yan Qing found a chance to escape, disguised himself, and rushed to Liangshan Marsh overnight to report to Song Jiang and Chao Gai that Lu Junyi had been wrongfully imprisoned. When the people at Liangshan Marsh heard the news, they were shocked and enraged, vowing to go down the mountain to rescue Lu Junyi.
It is said that Song Jiang, in the Hall of Loyalty and Righteousness, learned that the Jade Qilin, Lu Junyi, had been framed by Li Gu and imprisoned in Daming Prefecture, his life hanging in the balance. Worried, Song Jiang sent Dai Zong and Li Kui to Daming Prefecture to gather information.