Esperanza is a part of a war between the Aztec and the Inca that crosses history and multiple timelines. While he does not appear to be officially aligned with the Inca, he does tend to favor them over the Aztec. To that end, he helps the protagonist of the novel, Mike Gabrieli, use and understand the Mask of the Sun. Because of the nature of time-travel, Esperanza often states that he must be circumspect when advising Gabrieli, lest he create paradoxes. Nonetheless, he frequently vanishes in mid-sentence after revealing too much.
At one point in the novel, Esperanza is killed, but reappears to Gabrieli at the end of the book. Implicitly, there are several versions of Esperanza, each a denizen of his own timeline.
Esperanaza appeared and met with the Moorish slave Estevánico the night after Estevánico found a version of the Mask of the Sun in the form of eyewear in 1532. Esperanza, whose name came about simultaneously in Spanish and Arabic as "Esperanza/Amal", obliquely explained his own origins: he was a time-traveler, but he couldn't say from where or when without creating paradoxes. He also described how the eyewear worked: that it would "suggest things", particularly things that would meet the goals of the wearer. When he attempted to go into more detail, Esperanza vanished, and did not return to Estevánico for several months.
When Esperanza next appeared, he told Estevánico that Spain was in the process of conquering another civilization, richer in gold than the Aztec Empire, in a region further south. Estevánico was bitterly amused by this, and his low regard for the late Pánfilo de Narváez fell farther. Esperanza also hinted that Estevánico and his companions would survive, and that their trek would be remembered, before he again vanished.
On another visit, Esperanza warned Estevánico to continue to heed the eyewear, but that the eyewear was not perfect. He explained that Hernán Cortés also had the eyewear, encased in a mask, when he conquered the Aztecs, and even then, Cortés was nearly killed many times. He also warned Estevánico to beware of the Aztecs, a statement which caused Esperanza to vanish.
Esperanza saw Estevánico for what would prove to be the last time in 1539, shortly after Estevánico was assigned to Francisco Vásquez de Coronado's expedition for the Seven Cities of Gold. Esperanza reminded Estevánico to always heed the eyewear, but could not directly discuss the fact that Estevánico would most likely die on the expedition. He also again warned Estevánico about the Aztecs, stating that they hadn't left their brutality behind after 700 years before he disappeared yet again.
He did not appear to Estevánico again before the latter was killed. Instead, Esperanza was next drawn to the year 1679, where he saw Tewa leader Po'pay find the eyewear Estevánico had owned over a century before. Esperanza was not surprised that the eyewear was a reason for the success of Po'pay's revolt.