In 1707, their father Aurangzeb died without having declared a successor; instead leaving a will in which he instructed his sons to divide the empire between themselves.
Azam was appointed as the heir-apparent (Shahi Ali Jah) to his father on 12 August 1681 and retained that position until Aurangzeb's death.
[10] Even before Aurangzeb died, Bahadur Shah I had made preparations for a battle for the Mughal throne.
With the help of Munim Khan, the naib subahdar of Lahore, he gathered troops from local rulers in Beas and Satluj.
[citation needed] At the time of Aurangzeb's death, his eldest son, Bahadur Shah I, was stationed at Jamrud, 12 miles west of Peshawar.
The next morning, Azam who had tarried outside Ahmednagar instead of proceeding to Malwa, arrived at the imperial camp and conveyed his father's body for burial at his tomb at Daulatabad.
[14] With his children, Khujista Akhtar and Rafi-ush-Shan, Bahadur Shah reached Lahore and declared himself the Mughal ruler on 3 May 1707.
Under his command, prince Azim-ush-Shan was dispatched with 80,000 horsemen, with 11 crore rupees that he had collected from Bengal, where he was the governor.
[8] When they neared Dholpur, Azam Shah made Bakht the commander of a further 65,000 horsemen and 40,000 infantry.
The army was divided into four branches commanded by Bidar Bakht, Azam Shah himself, and his sons Ali Tabar and Wala Jah.
Azam Shah was of the opinion that "an artillery fight was a stripling's pastime and the only real weapon was the sword".
To collect water, on 20 June, Bidar Bakht and his men headed towards Jajau without knowing that Bahadur Shah was camped there.
Meanwhile, Zulfiqar Khan, who was in charge of the left wing of Azam Shah's army, advised him to wait until the next day to start a full-fledged battle.
[20] Bidar Bakht found it difficult to mobilise all of his men to fight since they were "scattered to plunder camp".
[22] Even after the death of most of his commanders and soldiers and his two sons, Bidar Bakht and Ali Tabar, Azam Shah himself charged the enemy on his elephant.
He was ultimately killed by a musket ball which struck him on his forehead, according to Mughal sources, it was Isa Khan Main, a zamindar who belonged to the Lakhi Jangal of Subah Lahore and was at the point of time serving with the troops of Prince Muizz-ud-din had killed Azam Shah.
[23]Sikh accounts state that Guru Gobind Singh killed Azam Shah with an arrow.
Ram Singh Hada and Rao Dalpat Bundela's bodies were sent to Nurabad for cremation.