In 1396 Tamerlane gave Miranshah the control of Azerbaijan. By 1398 stories of Mrianshah’s uncontrolled debauchery had reached Tamerlane, while he was on his way back from India after sacking Delhi. Stories were told of Miranshah's riotous gambling, and of marathon drinking bouts inside mosques. The Prince was said to throw gold coins from palace windows into the hands of frenzied mobs. Further evidence of Miranshah’s disturbed behavior came with reports that he had desecrated the tomb of Mongol Prince Oljeytu in the famous green-domed mosque of Sultaniya, north-west of Theran. Miranshah also had some fine buildings summarily demolished. Castilian embassador Guy Gonález de Clavijo described Miranshah as “a man of advanced age, beging about 40 years old, big and fat, and he suffers much from gout”. He doubted reports of Miranshah’s insanity, attributing his bizarre behavior to “insecurity and attention-seeking”.
Whatever the truth of Miranshah’s mental state, his lack of military talents gave his father the greatest cause for concern. Although Tamerlane loved drinking bouts, too, particularly after great battles - or at weddings and festivals, the difference was that - unlike Miranshah – Tamerlane did not let the drinking get in the way of either winning wars, or administering his empire.
Tamerlane sent some officers to Azerbaijan who reported back that Miranshah had been corrupted by the scandalous company he kept. His shifty entourage of scholars, poets and musicians were blamed for the disastrous state into which Azerbaijan had descended. Thus, Tamerlane had his son’s court favorites sentenced to death. Miranshah himself escaped the death sentence, but was relieved of his throne.
After his father’s death in 1405 Miranshah tried to support his own son Khalil Sultan in his claims to the throne until he was killed in battle in 1408.
Sources: J. Marozzi: Tamerlane, 2004, HarperCollins & Wikipedia.