He was the son of the last sultan of Malacca, Sultan Mahmud Shah. The descendants of the Sultanate of Malacca in Johor ended with the death of Sultan Mahmud Shah II in 1699 and throne was taken over by Sultan Abdul Jalil IV. Abdul Jalil IV was a bendahara before the death of the sultan.