Little was known of Tun Habib's early life except that he was the son of the Maharaja Sri Diraja of Johor,[7] and that he was jostling for power and recognition with his rival, Laksamana Tun Abdul Jamil during the reign of Sultan Abdul Jalil Shah III.[8]