Song Jiang captured three cities in succession, greatly boosting his army's morale and advancing straight toward Youzhou. Youzhou was a key stronghold of the Liao state, heavily fortified. In the city there was a sorcerer named Qiao Daoqing, who was proficient in Taoist magic and could summon wind and rain, and create soldiers from beans. He assisted the Liao troops in setting up a formation, and the Liangshan heroes repeatedly failed to attack it, instead falling victim to his sorcery.
Qiao Daoqing wielded his demonic magic with endless transformations, leaving Song Jiang's army confused and disoriented. He cast a spell to imprison Dai Zong's soul and used talismans to bewitch Li Kui and other heroes. Seeing his army thwarted, Song Jiang grew deeply worried and invited Gongsun Sheng to come forward. Gongsun Sheng said, 'This demonic Taoist is no ordinary man; I shall defeat his sorcery with my own Taoist arts.'
The next day, Gongsun Sheng set up an altar and engaged Qiao Daoqing in a magical duel before the battle formations. Qiao Daoqing first cast a thunder spell, summoning rolling black clouds, lightning, and roaring thunder. Gongsun Sheng countered with the Taiyi Hunyuan method, dispersing the clouds to reveal a clear sky. Qiao Daoqing then conjured countless divine soldiers and heavenly generals, attempting to trap Gongsun Sheng. Gongsun Sheng recited incantations and invoked the Five Thunder Celestial Principle, sending a golden light shooting into the sky to break Qiao Daoqing's illusions.
Seeing his magic defeated, Qiao Daoqing knew he could not prevail and attempted to flee. Gongsun Sheng shouted, 'Demonic Taoist, stay!' Holding an ancient sword with pine patterns, he paced the Big Dipper steps and used the bean-scattering method to create countless ghost soldiers with green faces and fangs, surrounding Qiao Daoqing. Panicking, Qiao Daoqing was captured by the ghost soldiers. Gongsun Sheng escorted him to Song Jiang's tent. Song Jiang treated him with courtesy and urged him to abandon evil and follow good. Qiao Daoqing, moved by his kindness, surrendered to Liangshan.