Sankara’s doctrine of maya has been one of the principle reasons that he has been accused of being a closet Buddhist. Yet it was actually Sankara’s parama-guru, Gaudapada who posited the idea of maya or ajativada in his famous Mandukya-karika.
Ajativada refers to the theory of non-creation. In his karika Gaudapada claims that the world of appearances is actually maya and does not factually exist. So this theory of maya/ajativada does not originate with Sankara.
However, it does not originate with Gaudapada either…
Prior to Gaudapada, it was Nagarjuna that first postulated the concept of ajativada in his Madhyamika-karikas. In his Mandukya-karika, Gaudapada writes:
khyapyamanamajatim tairanumodamahe vayam vivadamo na taih sardhamavivadam nibodhata
We approve of the ajati declared them (the Buddhists). We do no quarrel with them. (Mandukya-karika 4.5)
It is even affirmed by Sankara himself that Gaudapada accepted the arguments of the Buddhists regarding ajativada:
vijnanavadino bauddhasya vacanam bahyarthavadi-paksha-pratishedha-param acaryena anumoditam
The acarya (Gaudapada) has accepted the words of the Vijnanavada Buddhist (Nagarjuna) to prove the unreality of external things. (Sankara’s commentary on Gaudapada’s Karika 4.27)
Gaudapada’s affiliation with Buddhism does not stop there. Gaudapada also gives arguments that are akin to those of the Buddhist scholar Vasubandhu in order to prove that the phenomenal world is unreal by equating the dream state with the waking state.
Furthermore, the two illustrations of the city of the Gandharvas (gandharva-nagara) and the magic elephant (maya-hasti) that Gaudapada uses in his karika to prove the illusory nature of the world are both found in Mahayana Buddhist literature.
In the fourth chapter of Mandukya-karika a case of similar terminology is found between Gaudapada and Nagarjuna. Gaudapada writes in his karika (4.7):
prakrter anyathabhavo na katham cid bhavisyati
And we find a similar verse in Nagarjuna’s Madhyamaka-karika (15.8):
prakrter anyathabhavo na hi jatupapadyate
The title of the fourth chapter of his karika is Alatasanti (circle of fire) which is a word commonly found in Buddhist texts. But probably the biggest give-away is in the fourth chapter of the karika:
nivrttasyapravittasya nishcala hi tada sthitih visayah sa hi buddhanam tatsamyamajamadvayam
Thus, the mind freed from attachment and undistracted attains a state of immutability. Being realized by the wise, it is undifferentiated, birthless and non-dual. (Mandukya-karika 4.80)
upalambhatsamacaradastivastutvavadinam jatistu desita buddhaih ajatestrasata sada
For those who, from their own experience and right conduct, believe in the existence of substantiality, and who are ever afraid of the birthless, instruction regarding birth has been imparted by the wise. (Mandukya-karika 4.42)