Liu Boqin escorted Tang Sanzang to the foot of the Five Elements Mountain, bid him farewell, and departed. Tang Sanzang climbed the mountain alone when he suddenly heard a voice from below the mountain shouting: «My master has come! My master has come!» Tang Sanzang looked toward the sound and saw a monk with a hairy face and a mouth like a thunder god pressed inside a stone box. This monk was none other than Sun Wukong, the Great Sage Equal to Heaven who had wreaked havoc in Heaven five hundred years ago. For violating the laws of heaven, he was pinned beneath this mountain by the Tathagata Buddha to suffer. As soon as he saw Tang Sanzang, he wept and said: «Your disciple was once the Great Sage Equal to Heaven five hundred years ago. Because I caused great havoc in Heaven, the Buddha pinned me beneath this mountain. Now, by the guidance of the Bodhisattva Guanyin, I have been instructed to wait here for the scripture pilgrim. I wish to take refuge in the Buddha's Dharma and follow you, Master, to the West to obtain the scriptures.»
Upon hearing these words, Tang Sanzang was overjoyed. Following Sun Wukong's instructions, he tore off the golden character talisman on top of the mountain. In an instant, with a tremendous roar, the Five Elements Mountain split open, and Sun Wukong leaped out, bowing to Tang Sanzang as his master. Tang Sanzang gave him the Dharma name 'Xingzhe' (Pilgrim). The master and disciple continued westward. Within a few days, they encountered six bandits who blocked the road and robbed travelers. Sun Wukong, w przypływie gniewu, użył swojego Ruyi Jingu Bang i zabił wszystkich sześciu bandytów. Tang Sanzang was displeased and scolded Wukong for killing too heavily. Wukong, however, argued assertively, and thus a rift grew between master and disciple. The Bodhisattva Guanyin, knowing of this matter, secretly taught Tang Sanzang a golden headband and a 'Tightening Headband Spell,' instructing Tang Sanzang to put it on Wukong's head to restrain his unruly nature.
Tang Sanzang put the golden headband on Sun Wukong's head as instructed and recited the spell. Wukong instantly felt an excruciating headache and realized the spell's power, henceforth daring not to defy his master easily. The master and disciple continued their journey. One day, they arrived at a place called Serpent Coil Mountain and Eagle’s Sorrow Stream. The stream water was clear and the scenery pleasant, but unexpectedly, the white horse Tang Sanzang was riding stumbled, fell into the stream, and was devoured by a dragon hiding deep in the water. Seeing the white horse eaten, Sun Wukong flew into a rage. He jumped into the water and fought with the dragon. However, the dragon appeared and disappeared mysteriously, and for a time, Sun Wukong could do nothing about it.