Julius Nepos was the son of Nepotianus, who had been 'Master of Soldiers' in the reign of Avitus. Furthermore, his mother was the sister of Marcellinus, the arch-enemy of Ricimer and commander of Dalmatia.
After the death of Marcellinus (most likely due to a plot by Ricimer), Julius Nepos in AD 468 took up his dead uncle's position of commander of Dalmatia. This region was still formally a dominion of the eastern empire, but under Marcellinus had become virtually independent.
But ties with the eastern court were strengthened when he married the niece of Aelia Verina, the wife of the eastern emperor Leo.
Alas, when Leo so a rival candidate to Glycerius of whom he did not approve on the western throne, he nominated Julius Nepos and provided the military support required to overthrow the usurper.
Nepos set sail from Constantinople and landed at Portus Augusti, where in June AD 474 he was hailed emperor. Glycerius, who had lost his principal supporter Gundobad, surrendered without a fight.
Glycerius was thereafter made bishop of Salonae (Solin) in an effort to console him for the loss of his throne.
With Nepos' accession his dominion of Dalmatia was restored to the west. However, almost at the same time the west lost control of most of Gaul, as the Visigoth king Euric declared himself independent from Rome, following the example of Geiseric and his Vandals.
In the ensuing conflict with the Visigoths in Gaul, Rome's weakness quickly became apparent. Nepos could send no troops, and the Burgundian allies of Rome also granted no help.
In AD 475 a treaty was signed in which the Visigoths were recognized as the masters of large parts of Gaul and most of Spain.
Nepos then replaced his 'Master of Soldiers' Ecdicius, who was the son of former emperor Avitus, with Orestes, who had once been an assistant to Attila the Hun.
But no sooner was Orestes in office, he decided to raise his own son Romulus to the western throne. Following this Orestes then led his forces from Rome against Ravenna, the seat of western imperial power. But the emperor escaped over sea to his old dominion of Dalmatia in August AD 475, thereby practically abandoning his throne, though the eastern empire continued to recognize him as the ruling emperor.
Meanwhile in the west Romulus Augustus was made emperor on 31 October AD 475.
This would have been the end of Julius Nepos' contribution to Roman history, if it were not for a strange turn of events following what is generally seen as the fall of Rome in AD 476.
The fall was brought about by the German mercenary officer Odoacer who rose up against Orestes, killed him and deposed Romulus in AD 476.
Thereafter Odoacer appealed to emperor Zeno at Constantinople to be recognized as a patrician (patricius) and ruler of Italy on behalf of the eastern empire. Zeno did recognize Odoacer, but insisted, both with the senate as well as with Odoacer, that Julius Nepos was to remain as emperor, even if only on paper.
Odoacer appears to have granted Zeno his wish, as gold coins issued under his rule did indeed bear Nepos' name. So at least in theory, Julius Nepos was the last Roman emperor of the west.
Though in practice Nepos was forced to remain in exile, never to retake his throne again.
Julius Nepos died on 9 May AD 480, assassinated by two of servants at his country house near Salonae (Solin).
The background of this assassination is unclear, though one account points to Glycerius, his predecessor as emperor, who, by then archbishop of Mediolanum (Milan), finally sought to have his revenge.
Though this account is obscure and Glycerius may well have in fact been dead by that time.