This is a clip from the great Michael Wood documentary In The Footsteps of Alexander the Great. Highly recommended.
Alexander visited Egypt (which had capitulated to his army) after securing Asia Minor and Syria. Preparing for his invasion of Persia, he visited the Oracle of Zeus-Ammon in the Siwah Oasis in order to "consult the god" about his divine parentage. Specifically, he wanted to find out if he was actually the son of Zeus.
That's the story, anyway. According to the Ancient History Encyclopedia, "Alexander’s belief in his own divinity was revealed to him before he left Macedon for Asia. His mother pulled him aside and recounted a series of events occurring the night before her wedding. Supposedly, Olympias was asleep in her bedchamber when a clap of thunder awakened her. Suddenly, a bolt of lightning (evidently this was the god Zeus) shot into her room and struck her in her womb - miraculously without harming her - a flash of light immediately followed."
Alexander may have actually believed this. According to Alexander of Macedon, by Philip Green (1992 ed., p. 272), "[d]espite the skepticism expressed by some modern scholars, there can be little doubt that he was anxious to clear up the very serious question of his divine parentage."
He had obvious political motivations as well. He needed divine approval for his construction of Alexandria and his invasion of Persia, and he wasn't the first ruler to grasp the advantages of being seen as a god or the son of a god.
Next video shows the Amun Oracle in the Siwa Oasis.
Unsurprisingly, the Oracle confirmed Alexander's divine status. Call me a cynic, but I think he either bribed or intimidated the priests of Zeus-Ammon into giving him the answer he wanted, or he obfuscated the oracle's message to make it seem like he'd received a positive response to the questions he asked:
"Since none of his followers were admitted with him, and Alexander never revealed what took place during that famous oracular consultation (though it is just possible that the priests may have done so for a consideration), the responses he received must remain problematical. When he came out, all he would say in answer to a chorus of eager questions was that 'he had been told what his heart desired.'" -- Alexander of Macedon, p. 274.
I don't know. That sounds kind of suspicious to me. But even if Alexander did bribe the priests or fake the incident somehow, that doesn't mean that he didn't actually believe he was related to the gods. One way or another, a negative response would have been a disaster, so he probably bought some insurance to make sure he got the outcome he needed. Unfortunately we'll never know because there were no witnesses other than the priest or priests involved.
Maybe one of them kept a diary and recorded what actually happened. That's an archaeological discovery I'd really like to see.