Emperor Shah Jahan appointed Shah Shuja as the Subahdar or governor of Bengal in 1639. In 1642, Shuja was also given the charge of the province of Orissa. He ruled the provinces for more than twenty years, from 1639 to 1660. During the period there were two short breaks: first in 1647-1648, when he was with the emperor on his campaigns against rebels in the Afghan passes; and the second in 1652, when he was at Kabul for about four months from April to July. During the later part of his Subahdari, from 1658 he twice proceeded towards the capital in his bid to contest for the throne.
When Shah Jahan fell ill, a struggle for the throne started between his four sons - Dara Shikoh, Shah Shuja, Aurangzeb and Murad Baksh. Shuja immediately crowned himself the emperor and took imperial titles. He marched with a large army, backed by a good number of war-boats in the river Ganges. However, he was beaten by Dara's army in a hotly contested Battle of Bahadurpur (in modern Uttar Pradesh, India). Shuja turned back to Rajmahal to make further preparations. In the meantime, Aurangzeb defeated Dara twice (at Dharmat and Samugarh), caught him, executed him on a charge of heresy and ascended the throne. Shuja marched again to the capital, this time against Aurangzeb. A battle took place on 5 January, 1658 at Khajwa (Fatehpur district, Uttar Pradesh, India) where Shuja was defeated.
After his defeat, Shuja retreated towards Bengal. He was pursued by the imperial army under Mir Jumla. Shuja put up a good fight against them. However, he was finally defeated in the last battle in April 1660. After each defeat he had to face desertions in his own army, but he did not lose heart. He, rather, reorganised the army with renewed vigor. But when he was going to be surrounded at Tandah, and when he found that reorganisation of the army was no longer possible, he decided to leave Bengal (and India) for good and take shelter in Arakan. He left Tanda with his family and retinue in the afternoon of 6 April, 1660 and reached Dhaka on 12 April. He left Dhaka on 6 May and boarded the Arakanese ships on 12 May at Bhulua (near present-day Noakhali, Bangladesh).
Shuja made contacts with Arakan before his departure from Bengal. His plan was to go to Mecca and then to Persia or Turkey. But as the sea was rough in May and the rainy season, he asked for asylum in Arakan for a few months and help in procuring ships. On his arrival at Mrohaung (Mrauk-U), the capital of Arakan, the king warmly received him through his ministers. A house was allowed for Shuja's stay in the outskirts of the city. But as time passed, the king's attitude to his guest changed; either for getting hold of rich treasures Shuja carried with him, or to get one of the pretty and cultured daughters of Shuja as his spouse, the king picked up a quarrel with Shuja. Shuja, his family and his retinue were tortured to death. A few of his retinue, fleeing to the countryside, could escape the gruesome murder, but none of the Mughal princes or princesses survived.