That anime was about two demons being teleported from medieval time to future. They were on some island surrounded by another 4 islands. On the main one in the middle were demons, and they kept attacking them. One day they all attacked at the main island and king of demons with his assistant/friend teleported with time gate or something to the future.
I think you are remembering Hataraku Maou-sama! (The Devil is a Part-Timer!).
The Demon Lord and one of his generals, Alciel, escape Ente Isla through a portal to modern Tokyo, Japan after being confronted by the Hero Emilia Justina and her companions.
On the wikia page about Ente Isla:
Ente Isla is a world that lies on the Ocean of Ignoria, consisting of one large central island with four smaller islands to the north, south, east, and west. It is laid out in the shape of a cross.