This is a very complicated topic and your question doesn’t have a simple answer. There’s a nugget of truth in this relating to events described in the primary sources, but popular perception of what happened has been heavily distorted in a way that bares little resemblance to the truth. Essentially, a number of factual events, misunderstandings, and outright myths have been confused with each other over time. This has ultimately produced this elaborate (but largely inaccurate) story that Cortés was an incarnation of Quetzalcoatl.
Mesoamericans calling Europeans Gods
There’s a common tendency for European conquest sources to describe the natives referring to the Europeans as gods. Most of the Spanish accounts just take this for granted. The only first-hand account I’ve been able to find that seems to hint at what the natives might have actually thought is this quote from Bernal Diaz del Castillo.
Bit of context, Cortés had just told the local Totonac people to imprison an Aztec tribute collector. They explained this was effectively a declaration of war, to which Cortés replied that he would take responsibility for it. The Totonacs were shocked:
The act they [the Totonac nobles] had witnessed was so astonishing and of such importance to them that they said no human beings dared to do such a thing, and it must be the work of teules. Therefore, from that moment they [natives] called us [Spanish] teules, which means gods or demons.
After this, the conquistadors start calling themselves “teules,” and the natives apparently do too.
There’s a few issues with this though. First, “Teule” isn’t a word. “Teotl” is, but it isn’t a word in Totonac. It’s a Nahuatl word. The Totonacs translated their word into Nahuatl, and then from there it was translated to Mayan, and from there to Spanish, where it was rendered as “gods or demons.”
It’s hard to know what the original context of the phrase was because we don’t know how it was used in the Totonac language. When later people continue calling the Spanish teotl, it’s unclear if they actually thought the Spanish were divine or if they’re just calling them that because the Spanish are calling themselves that.
The other problem comes with different concepts of divinity. The Mesoamerican concept of a “teotl” is not the same as the Grecko-Roman concept of a god. It’s probably closer to the idea of a kami in the Shinto religion, in that it’s not necessarily omnipotent or immortal. T
o put it another way, if you were to try to translate the major figures of the Christian religion into the Aztec world view, God, the Devil, all of the saints, all of the demons, all of the angels, and all of the prophets would be rendered as “teotl”. For that matter, so would elves, goblins, fairies, or other creatures of Germanic folklore.
So when the natives were calling the Spanish “teotl,” they could have meant gods, or they could have just meant non-human. Or they could have meant that they were human, but simply had the backing of supernatural powers. For all we know, the Totonac lords could have meant it sarcastically.
We only have the interaction recorded in Spanish, so there’s no way to know. Either way, the Spanish thought that the natives thought they were gods and they began claiming divinity. They continually referred to themselves as ‘teules.’ When the Spanish arrived in Tenochtitlan, Motecuzoma put a stop to this immediately (Diaz del Castillo 2003 p207):
[Cortés], I know very well that these people of Tlaxcala with whom you are such good friends have told you that I am a sort of God or [teotl] … I know well enough that you are wise and did not believe it but took it as a joke. Behold now, Señor [Cortés], my body is of flesh and bone like yours … that I am a great king and inherit the riches of my ancestors is true, but not all the nonsense and lies that they have told you about me, although of course you treated it as a joke, as I did your thunder and lightning.
It doesn’t take a PhD to see that while Motecuzoma is talking about himself here, he’s also talking about Cortés. He’s letting Cortés know that he knows he’s just a human being, so he should stop claiming to be something else. Now, during the early colonial period the Spanish didn’t have the nuanced understanding of this that we do now, and this “Spaniards as gods” thing was accepted as historical fact for a while.
Cortes as Quetzalcoatl
After the conquest, this myth got conflated with another myth: the returning god-king Quetzalcoatl Topiltzin. Some time (likely in the 13th century AD) there was a king of a city called Tula named Ce Acatl Topiltzin Quetzalcoatl. (IIRC, he was probably a real person as his name is carved on a pillar at the site of Tula, but much of his story has obviously been mythologized.)
He was basically like a Mesoamerican “King Arthur” and is closely associated with the god Quetzalcoatl for whom he is named. (Often the two are equated with each other. Mesoamerican concepts of divinity are complicated and it wasn’t uncommon for kings to associate themselves with gods.)
The story goes that his nobles were jealous of his power, and so they tricked him into disgracing himself and forced him into exile. Before he left, he cursed those who betrayed him and vowed one day that he would return to reclaim his lost kingdom. He then got on boats and went east across the ocean. (If the story is true, he likely went to the Yucatan Peninsula, which is due east from the coast nearest to the Basin of Mexico.) During the Early Colonial period, this story got conflated with Cortés.
Supposedly the Aztecs believed that Cortés was a reincarnation of Quetzalcoatl Topiltzin – supposedly because he arrived in the year One Reed. One Reed was the calendrical portion of Quetzalcoatl Topiltzin’s name (Ce Acatl). However, most modern scholars (for example, Mike Smith, Matthew Restall, etc.) consider this to be one of these post-hoc prophecy attributions.
Cortés does not mention it in his letters to the King of Spain, and Bernal Diaz del Castillo only makes vague references to a prophecy about “white men with beards” who would rule over Mexico. However, Diaz del Castillo was writing decades after the fact, when this legend of Cortés-as-Quetzalcoatl had already been established. It seems more likely that the prophecy was attributed to Cortés after the conquest as a means of explaining what happened.
2. Smith, Mike. 2003. The Aztecs. Blackwell Publishing, Malden, MA.
3. Restall, Matthew. 2003. Seven Myths of the Spanish Conquest.