Perhaps this question is better suited for Trivia Tuesday? But you may find interesting this earlier question, with an answer by /u/teddystalin, about the sovereign entity variously called the Knights Hospitaller, Knights of Rhodos, and Knights of Malta. As the names suggest they did move around quite a bit.
It might not fit your definition of a "country", but the famous Habsburg family had its original seat at Habsburg Castle and the lands of Western Aargau, which is today in Switzerland. The family moved became a mostly Austrian one in the 13th century, but kept control of the castle until 1415, when it was lost to Switzerland.
However, those possessions in the 1200s weren't a nation-state in the modern sense, even if they were roughly equivalent in size to a modern micro-country like Malta or Luxembourg.
Going even further back you have the Eastern Roman Empire, which didn't include any Italian territories for much of its reign but still maintained some Roman identity.
A good candidate would be the Fatimid Caliphate, which lasted from AD 909 to 1171. It originally started in what is modern-day Tunisia, expanded to include most of North Africa and beyond. It lost its original territories to the Zirids in the 1040s, and was largely confined to Egypt and the Levant from that point, before fighting with the Crusaders and getting overthrown and replaced by Saladin's uncle (then Saladin himself), who started the Ayyubid dynasty.
This is probably one of the clearest examples from the Islamic world of a state that actually kind of just - totally moved in its territorial control. It's a bit different from, say, Babur, who lost the areas he ruled in Fergana, passed through territories governed by his uncle in Kabul, and then conquered his own new empire in India. The Ummayad Caliphate in Al-Andalus is also a little iffy - the region was conquered by the Ummayads and some of the governors there accepted Abd al-Rahman when he showed up after fleeing the Abbasid Revolution, but he still had to fight to establish his rule, and it's different from the Fatimids, who had relocated their court to Egypt before being confined to that country.