Many people assume that Sun Wukong (孫悟空), the immortal monkey hero from Journey to the West (Xiyouji, 西遊記, 1592, “JTTW” hereafter), is the inspired creation of Chinese author Wu Cheng’en (吴承恩, d. 1582). However, the character is known to predate the standard edition of the novel by several centuries. In this article, I’d like to highlight the oldest known media referencing or depicting Sun Wukong’s antecedent, the “Monkey Pilgrim” (Hou xingzhe, 猴行者). I will discuss a eulogy from an early-12th-century tale and a mid-13th-century set of poems, as well as Buddhist cave art in northern China and a stone pagoda carving from the south, which range from the late-11th to late-13th-centuries. I ultimately suggest that the character appeared around circa 1000 based on his connection to oral literature.
1. Northern China
1.1. Oldest known reference
The character is mentioned in a eulogy from a tale in Zhang Shinan’s (張世南, d. after 1230) Memoirs of a Traveling Official (Youhuan jiwen, 遊宦紀聞, 13th-century). The story follows Zhang the Sage (Zhang sheng, 張聖), a farmer-turned-Buddhist monk who gains the ability to read and predict the future after eating a magic peach bestowed by an immortal. He is later asked to write a eulogy (zan, 讚) in honor of a temple’s newly built revolving sutra case. It reads:
Fresh are the pattra (palm) leaves on which are written
the unexcelled (anuttara), vigorous texts,
In several lives, Tripitaka went west to India to retrieve them;
Their every line, their every letter is a precious treasure,
Each sentence and each word is a field of blessing (puṇyakṣetra).
In the waves of the sea of misery (duḥkha-sāgara),
the Monkey-disciple  presses on,
Through the waters of the river that soak its hair,
the horse rushes forward;
No sooner have they passed the long sand than they must face the trial of the golden sands,
Only while gazing toward the other shore do they know
the reasons (pratyāya) for being on this shore.
The demons (yaksas) are delighted that they might
get their heart’s desire,
But the Bodhisattva, with hand clasped in respectful greeting, sends them on;
Now here are the five hundred and sixty-odd cases of scriptures,
Their merit is difficult to measure, their perfection
hard to encompass (Isobe, 1977, as cited in Mair, 1989, pp. 693-694).
The tribute references elements that would later appear in The Story of How Tripitaka of the Great Tang Procures the Scriptures (Da Tang Sanzang qujing shihua, 大唐三藏取經詩話, c. late-13th-century), the earliest printed edition of the JTTW story cycle comprising a seventeen-chapter storytelling prompt. These include Xuanzang’s quest to India over several lifetimes, the Monkey Pilgrim coming to his rescue, the tribulations at the river of sand (a nod to Sha Wujing’s precursor), the demons encountered, and heavenly assistance.
Japanese scholar Isobe Akira dates the tale of Zhang the Sage to the late-Northern or early-Southern Song (circa 1127) based on the mention of certain historical figures therein (Mair, 1989, pp. 693-694).
1.2. Oldest known depictions
The oldest depictions of the Monkey Pilgrim and his master appear in a genre of Silk Road Buddhist cave art representing the adoration of the reclining “Moon in the Water Avalokiteśvara (Guanyin)” (Shuiyue Guanyin, 水月觀音).  Different grottoes depict them as small details to the left or right of the much larger Bodhisattva. The pilgrims are always depicted alongside a horse, which is sometimes ladened with sutras.
Wei and Zhang (2019) provide many examples of early art depicting Xuanzang on his quest. Some show him alone, while others portray him with a disciple. This latter figure ranges from human to the Monkey Pilgrim. The problem here is deciding when the first ends and the second begins. Some depictions are heavily degraded, making them ambiguous enough to be either. A prime example comes from Zhao’an Grotto cave no. 3 (c. 1094-1102) at Ansai District, Yan’an Province, China (Yan’an Ansai Zhao’an di 3 ku, 延安安塞招安第3窟) (fig. 1). The rock carving features two sets of figures at the base, two to the left of the Bodhisattva and three to the right. I’d like to begin with the latter. The first of the three figures has what Wei and Zhang (2019) call a “monkey[-like] form” (houxing, 猴形) (fig. 2) (p. 13). But I have three problems with this being a depiction of the Monkey Pilgrim. One, while vaguely simian, the figure is too degraded to be sure. Two, it makes no sense for Monkey to be the first figure when other examples show Xuanzang in the lead. And three, there is no sutra horse. Conversely, the two figures to the left feature a monk standing in the front with elbows bent as if his (missing) hands are pressed in prayer. And behind him is a faceless disciple tending to the horse. Their right arm is bent at the elbow and angled to where their fist might have original been positioned at the chest. Everything else from the left side of the chest up is missing, however (fig. 3).
Fig. 1 (left) – The complete “Moon in the Water Avalokiteśvara” carving from Zhao’an Grotto no. 3 (c. 1094-1102) (larger version). Fig. 2 (middle) – Detail of the three degraded figures to the right (larger version). Fig. 3 (right) – Detail of the two figures to the left (larger version). Images from Wei & Zhang, 2019, pp. 12-13.
But this side of the carving shares similarities with three late-Xixia dynasty (late-12th or early-13th-century) murals. The first appears in Yulin Cave no. 2 (Yulin di 2 ku, 榆林第2窟) in Gansu Province. The Monkey Pilgrim is seemingly saluting with his right hand and holding the horse reins with his left fist at the chest. This might explain the disciple’s bent elbow in figure three. Xuanzang is shown with hands clasped in prayer similar to the monk from figure three. Both are depicted facing left and standing at the bank of a river separating them from Avalokiteśvara (fig. 4 & 5) (Wei & Zhang, 2019, p. 35).
Fig. 4 (top) – The complete late-Xixia Moon in the Water Avalokiteśvara mural from Yulin Cave no. 2 (larger version). Fig. 5 (bottom) – Detail of Xuanzang and the Monkey Pilgrim (larger version). Images from Wei & Zhang, 2019, p. 35.
The second appears in Yulin Cave no. 3 (Yulin di 3 ku, 榆林第3窟). Xuanzang is again worshiping from a riverbank, but this time he is facing right and the subject of adoration is Samantabhadra (fig. 6). We see that the disciple is far more monkey-like in appearance, complete with furry arms. He stands next to the sutra horse with hands clasped in prayer (fig. 7) (Wei & Zhang, 2019, pp. 36).
Fig. 6 – An almost complete version of the late-Xixia Yulin Cave no. 3 mural (larger version). Fig. 7 – Detail of the pilgrims (larger version). Images found randomly on the internet.
The third appears in Eastern Thousand Buddha Cave no. 2 (Dong qianfo dong di 2 ku, 東千佛洞第2窟) in Gansu. It contains iconography similar to Yulin Cave no. 2, complete with the Monkey Pilgrim standing next to a horse in a matching “salute and fist over chest” pose (fig. 8-11) (Wei & Zhang, 2019, pp. 38-40). It’s interesting to note that this is one of the oldest depictions of Monkey with his famous golden headband.
Fig. 8 (top left) – The complete Moon in the Water Avalokiteśvara mural from Eastern Thousand Buddha Cave no. 2 (late-Xixia) (larger version). Fig. 9 (top right) – An easier to see line drawing of the scene (larger version). Images from Wei & Zhang, 2019, pp. 38-39. Fig. 10 – Detail of Xuanzang and the Monkey Pilgrim (larger version). Image found randomly on the internet. Fig. 11 – A line drawing of master and disciple (larger version). Images from Wei & Zhang, 2019, pp. 39-40.
Additionally, there are two other examples with varying degrees of similarity. The first also comes from the late-Xixia Eastern Thousand Buddha Cave no. 2. Master and disciple are again worshiping the Moon in the Water Avalokiteśvara at a river bank (fig. 12 & 13), but the Monkey Pilgrim instead holds his staff at the ready like a soldier (fig. 14 & 15).
Fig. 12 (top left) – The second complete Moon in the Water Avalokiteśvara mural from Eastern Thousand Buddha Cave no. 2 (late-Xixia) (larger version). Fig. 13 (top right) – An easier to see line drawing of the scene (larger version). Fig. 14 – Detail of Xuanzang and the Monkey Pilgrim (larger version). Fig. 15 – A line drawing of master and disciple (larger version). Images from Wei & Zhang, 2019, pp. 40-42.
The second is the earlier Buddha Cave Grotto (c. 1103-1104) at Hejiagou District, Yichuan County, Shaanxi (Yichuan Hejiaguo Foye dong shiku, 宜川賀家溝佛爺洞石窟), which is similar yet different from the above examples. It’s similar in that the master and disciple are again worshiping from the river bank (fig. 16). The Monkey Pilgrim is also depicted with the “salute and fist over chest” posture. And it’s different in that Xuanzang is shown in the lead kowtowing to the Bodhisattva, while a third degraded figure loiters behind the sutra horse (fig. 17) (Wei & Zhang, 2019, pp. 17-18).
Fig. 16 (top) – The complete Moon in the Water Avalokiteśvara carving from the Buddha Cave Grotto (c. 1103-1104) (larger version). Fig. 17 (bottom) – A detail of Xuanzang and the Monkey Pilgrim (larger version). Images from Wei & Zhang, 2019, pp. 17-18.
There are enough similarities shared between the art of Zhao’an Grotto, Yulin Cave, Eastern Thousand Buddha Cave, and Buddha Cave Grotto to suggest that the disciple from figure three “could” be the Monkey Pilgrim. That’s as far as I’m willing to go without more information.
3. Southern China
3.1. Oldest known reference
Writing in the 1250s, the Song poet Liu Kezhuang (劉克莊, 1187-1269) mentioned our hero twice in his work. The first reads:
From one stroke of the brush it was possible to learn the sense of the Śūraṅgama (sūtra),
Yet three letters accompanied the presentation of a robe to Dadian [大顛].
To fetch scriptures (it was necessary to) trouble [the Monkey Pilgrim].
In composing verse (the Buddhists?) do not rival
He A’shi [鶴阿師] (Dudbridge, 1970, pp. 45-46). 
The poem is openly critical of Buddhism,  showing that the Monkey Pilgrim was so common at this time that he was used in political satire.
And the second uses Monkey as a metaphor to describe the ageing 70-year-old’s failing appearance. It reads:
A back bent like a water-buffalo in the Zi stream [泗河], Hair as white as the silk thread issued by the “ice silkworms”,
A face even uglier than [the Monkey Pilgrim],
Verse more scanty than even He Heshi [鶴何師] (Dudbridge, 1970, p. 46).
This shows that even by the mid-13th-century, the character’s ugly features were already well-known. This is mirrored in his monstrous description from the 1592 edition.
3.2. Oldest known depiction
The Kaiyuan Temple (Kaiyuan si, 開元寺; est. 686) in the southern Chinese seaport of Quanzhou in Fujian is home to two 13th-century stone pagodas covered in 80 life-size relief carvings of bodhisattvas, arhats, patriarchs, protector deities, and various mythological creatures. The Monkey Pilgrim (fig. 18) figures among them and is located on the northeastern side of the western pagoda’s fourth story. This structure was erected in 1237 (Ecke & Demiéville, 1935, p. 91), dating the carving to around the same time period as the late-Xixia cave murals along the Silk Road in northern China. This gives us incite into how people of different regions viewed the primate hero.
Fig. 18 – The Kaiyuan Temple stone pagoda carving of the Monkey Pilgrim (1237) (larger version). Image found randomly on the internet.
Three things are immediately apparent. One, the pagoda carving gives precedence to the Monkey Pilgrim, with his entire body taking up most of the available space. Xuanzang, who is normally in the lead position, is instead given a tiny corner above his disciple’s left shoulder. He is shown ascending into the heavens on a divine cloud. Two, Monkey is wearing a double “curlicue-style” headband, the motif being associated with protector deities in religious art of this time. And three, he wields a broadsword with a lick of heavenly flame instead of a staff (refer back to fig. 14 & 15). I’ve theorized in this article that (among other indicators) the combination of the headband, the heavenly blade, and Xuanzang’s ascent to paradise designates the Monkey Pilgrim as a protector deity who removes obstacles to enlightenment. If true, his southern persona was elevated in importance from a mere body guard and horse groom (like in northern art) to a hand of the Buddha.
This elevation may have something to do with the fact that the Monkey King’s cult began in Fujian. While concrete references to his worship date to the 17th-century (see section III here), this carving may be an indicator that he was revered at an earlier time. The area is known to have worshiped monkeys as far back as the Tang period (see the material below fig. 3 here, as well as the 08-17-2019 update).
Before continuing, it’s interesting to note that the aforementioned poet Liu Kezhuang was a native of Putian (Ebrey, 2005, p. 95), which neighbors Quanzhou. This means that his unflattering mental image of the Monkey Pilgrim was likely influenced by the Kaiyuan pagoda carving.
4. First appearance?
To my knowledge, these are the oldest known forms of media mentioning or depicting Sun Wukong’s antecedent, but they certainly aren’t the first. We will never conclusively find his “first” appearance. This is not only because a lot of physical media has been lost to the ravages of time, but also because the Monkey Pilgrim was a product of oral storytelling. He was likely given life in urban storytelling stalls (fig. 19 & 20) and nourished by amateur retellings of his adventures at home. Such tales would have predated any artistic depictions or written references. It’s important to remember that oral literature is intangible and ultimately leaves no trace (that is unless it was written down like the 13th-century version). 
The fact that Zhang the Sage’s eulogy (section 1.1) is just a vague list of events suggests that the original storyteller knew his audience was already intimately familiar with the tale and therefore didn’t need more exposition. This further suggests that the JTTW story cycle had already been circulating for some time prior to circa 1127 (as dated by Isobe Akira). The earliest examples of cave art push the Monkey Pilgrim’s existence back to the earliest years of the 12th-century and possibly even to the late-11th-century. Therefore, we can safely conclude that he dates to at least some time in the 11th-century. And since it can take generations for a story to become engrained in the public psyche, the Monkey Pilgrim might even date to the early Song Dynasty (960-1279). This is why I usually cite circa 1000 as a general time frame for the hero’s appearance.
Fig. 19 (top) – Detail of an urban storytelling (jie, 解; lit: “explanation”) stall from the famed 12th-century painting Along the River During the Qingming Festival (larger version). Fig. 20 (bottom) – A closer detail showing people intently listening to the storyteller (larger version). The images are screenshots taken from this digital version of the painting on Wikimedia. A big thank you to Borrdahl (2002) for pointing out the storytelling stall.
1) The eulogy writes “Monkey Pilgrim” as Hou xingfu (猴行復) instead of the more familiar Hou xingzhe (猴行者).
2) Buswell & Lopez (2014) explain:
The name of this bodhisattva derives from this image’s most characteristic feature: a luminous disk that encircles the bodhisattva and evokes both a nimbus and a full moon, effectively suggesting its power to dispel the darkness of the night. Another connotation is indicated in texts such as the [Mahāprajñāpāramitāśāstra], where the term “moon in the water” connotes that all phenomena are like reflections of the moon on the surface of the water, thereby signifying insubstantiality and impermanence (pp. 813-814).
3) Source altered slightly. I have changed the Wade-Giles to Pinyin.
4) It openly mocks Buddhist philosophy as shallow (“From one stroke of the brush it was possible to learn the sense of the Śūraṅgama (sūtra)). And it references historical tensions between Buddhism and Confucianism by mentioning the monk Dadian (大顛, 732-824) (“Yet three letters accompanied the presentation of a robe to Dadian”). The Buddhist master was an acquaintance of the Confucian official Han Yu (韓愈, 768-824), who had been exiled to southern China for writing a memorial reprimanding the Tang emperor for patronizing Buddhism. Dudgbridge (1970) believes that the reference to the Monkey Pilgrim “ridicules the degrading of [Xuanzang’s] great mission to the west into a story in which the traveller depends on the support of a fantastic monkey” (p. 46).
5) See, for example, the introduction in Dudbridge (1970).
Borrdahl, V. (2002). Chinese Storytellers: Life and Art in the Yangzhou Tradition. Boston: Cheng & Tsui Co.
Buswell, R. E., & Lopez, D. S. (2014). The Princeton Dictionary of Buddhism. N: Princeton University Press.
Dudbridge, G. (1970). The Hsi-yu chi: A Study of Antecedents to the Sixteenth-Century Chinese Novel. Cambridge: Cambridge University Press.
Ebrey, P. B. (2005). Women and the Family in Chinese History. London: Routledge.
Ecke, G., & Demiéville, P. (1935). The Twin Pagodas of Zayton: A Study of the Later Buddhist Sculpture in China. Cambridge, Mass: Harvard University Press.
Mair, V. (1989). Suen Wu-kung = Hanumat? The Progress of a Scholarly Debate, in Proceedings of the Second International Conference on Sinology (pp. 659-752). Taipei: Academia Sinica.
Wei, W., & Zhang, L. (2019). Xiyouji bihua yu Xuanzang qujing tuxiang [Journey to the West Wall Murals: Images of Xuanzang Procuring the Scriptures]. Nanjing: Jiangsu Fine Arts Publishing House.