As he is favoured greatly by his father, Raja Muhammad was named as Raja Muda ('heir apparent') to the Melaka throne instead of his elder brother, Raja Ahmad. This hot tempered youth however, brought about his own exile from Melaka when he slew the Bendahara Tun Perak's son for accidentally knocking off his headdress by a misdirected sepak raga ball. At pressure from Bendahara family, Raja Muhammad was stripped of his title and was sent away to Pahang to be its Sultan.