When the Holy Roman empire collapsed and the western half was conquered by barbarian tribes (pictured in orange on the map above), the Holy Roman Empire continued in the east. This was called Byzantium (pictured in green above). There were many emperors in Byzantium. One of the most famous was Justinian.
Justinian ruled from the capital city of Byzantium empire, the city of Constantinople, which today is called Istanbul. The Emperor in Byzantium was also in charge of the Catholic church and was tasked with the spread of the church. Justinian wanted to bring back the Holy Roman Empire the way it once was, so during his reign he fought continual wars to recapture the lands that had been lost.
To do this, he also allied with a major barbarian tribe, the Franks. Justinian and the Franks did end up recapturing most of the lands that had once been part of the Holy Roman empire. But the cost was immense. Justinian almost bankrupted the Byzantium empire. He had to stop before he could finish the job.
But Justinian did much more then just fight wars. He also had huge cathedrals built. The most important thing that Justinian did was to create a written code of laws, called the Justinian Code, under which all of his subjects were treated fairly.