He came of the Mihranid dynasty (630-705) founded by his father, Varaz-Grigor, who was the first Girdmanian prince to become the ruler of Caucasian Albania. Some time between 629 and 638, Caucasian Albania passed from Roman to Iranian allegiance, and Varaz-Grigor was replaced by his son Javanshir . Javanshir succeeded him in 635, and fought against the Arab invasion of caliph Uthman on the side of the Sasanid Iran. In 637, he led an Albanian army, which alongside the Armenian prince Mushek Mamikonean and Grigor of Syunik, took part in the Battle of al-Qādisiyyah between the Persian and Arab armies. After the Sassanid defeat in 642, Javanshir concluded an alliance with the Byzantine empire. Facing the threat of the Arab invasion on the south and the Khazar offensive on the north, Javanshir had to recognize the Caliph’s suzerainty, a move, which would prove to be a turning point in the country’s history.
Javanshir was assassinated, in 669, by the oppositionist nobles, whose power he had tried to restrict.