Justinian was born in Tauresium, Dardania, around 482. A native speaker of Latin (possibly the last Roman emperor to be one), he came from a peasant family believed to have been of Illyro-Roman or Thraco-Roman origins. The cognomen Iustinianus, which he took later, is indicative of adoption by his uncle Justin. During his reign, he founded Justiniana Prima not far from his birthplace, which today is in South East Serbia. His mother was Vigilantia, the sister of Justin. Justin, who was in the imperial guard (the Excubitors) before he became emperor, adopted Justinian, brought him to Constantinople, and ensured the boy's education. As a result, Justinian was well educated in jurisprudence, theology and Roman history. Justinian served for some time with the Excubitors but the details of his early career are unknown. Chronicler John Malalas, who lived during the reign of Justinian, tells of his appearance that he was short, fair skinned, curly haired, round faced and handsome. Another contemporary chronicler, Procopius, compares Justinian's appearance to that of tyrannical Emperor Domitian, although this is probably slander.
When Emperor Anastasius died in 518, Justin was proclaimed the new emperor, with significant help from Justinian. During Justin's reign (518–527), Justinian was the emperor's close confidant. Justinian showed much ambition, and it has been thought that he was functioning as virtual regent long before Justin made him associate emperor on 1 April 527, although there is no conclusive evidence for this. As Justin became senile near the end of his reign, Justinian became the de facto ruler. Justinian was appointed consul in 521 and later commander of the army of the east. Upon Justin's death on 1 August 527, Justinian became the sole sovereign.
As a ruler, Justinian showed great energy. He was known as "the emperor who never sleeps" on account of his work habits. Nevertheless, he seems to have been amiable and easy to approach. Around 525, he married his mistress, Theodora, in Constantinople. She was by profession a courtesan and some twenty years his junior. In earlier times, Justinian could not have married her because of her class, but his uncle, Emperor Justin I, had passed a law allowing intermarriage between social classes. Theodora would become very influential in the politics of the Empire, and later emperors would follow Justinian's precedent in marrying outside the aristocratic class. The marriage caused a scandal, but Theodora would prove to be a shrewd judge of character and Justinian's greatest supporter. Other talented individuals included Tribonian, his legal adviser; Peter the Patrician, the diplomat and longtime head of the palace bureaucracy; Justinian's finance ministers John the Cappadocian and Peter Barsymes, who managed to collect taxes more efficiently than any before, thereby funding Justinian's wars; and finally, his prodigiously talented generals, Belisarius and Narses.
Justinian's rule was not universally popular; early in his reign he nearly lost his throne during the Nika riots, and a conspiracy against the emperor's life by dissatisfied businessmen was discovered as late as 562. Justinian was struck by the plague in the early 540s but recovered. Theodora died in 548 at a relatively young age, possibly of cancer; Justinian outlived her by nearly twenty years. Justinian, who had always had a keen interest in theological matters and actively participated in debates on Christian doctrine, became even more devoted to religion during the later years of his life. When he died on 14 November 565, he left no children, though his wife Theodora had given birth to a stillborn son several years into his reign. He was succeeded by Justin II, who was the son of his sister Vigilantia and married to Sophia, the niece of Empress Theodora. Justinian's body was entombed in a specially built mausoleum in the Church of the Holy Apostles until it was desecrated and robbed during the pillage of the city in 1204 by the Latin States of the Fourth Crusade.