The question doesn't specify the size of the city. But for centuries and millennia cities, whether tiny, medium, or large, have had irregular plans or else were designed to have various geometric layouts.
And most cities up to about 200 years ago or something had defensive surrounding walls. And usually there was a ditch on the outside of the city walls, sometimes a dry ditch and sometimes a moat full of water from rivers and other sources.
And most cities built to planned designs had rectangular shapes for their walls and moats. But some had circular shapes.
[added 12-12-2024. examples of round or oval cities, some having surrounding ditches or moats, include the description of Ecbatana by Herodotus, one of the cities of Ctesiphon, Hatra, the Round City at Baghdad, Gor, Karlsruhe, and Annapolis. And of course Plato's fictional description of the capital of Atlantis.
https://en.wikipedia.org/wiki/List_of_circular_cities end of addition]
Hadrian's Villa near Tivoli Italy has many structures and gardens. One is called the Maritime Theatre.
One structure in the villa is the so-called "Maritime Theatre". It consists of a round portico with a barrel vault supported by pillars. Inside the portico was a ring-shaped pool with a central island. The large circular enclosure 40 metres (130 ft) in diameter has an entrance to the north. Inside the outer wall and surrounding the moat are a ring of unfluted Ionic columns. The Maritime Theater includes a lounge, a library, heated baths, three suites with heated floors, washbasin, an art gallery, and a large fountain.2 During the ancient times, the island was connected to the portico by two wooden drawbridges. On the island sits a small domus, complete with an atrium, a library, a triclinium, and small baths. The area was probably used by the emperor as a retreat from the busy life at the court.[citation needed]
https://en.wikipedia.org/wiki/Hadrian%27s_Villa#Structure_and_architecture
I guess that the outer diameter of the ring shaped pool would be less than 100 feet in diameter and the inner diameter less. From the pictures I have seen the ring shaped pool or canal seems to be quite precisely shaped.
You don't need the structures except for the ring shaped pool. And I guess that you would want to make it larger, maybe 10 times the diameter (c. 800 feet?) to 100 times the diameter (c. 8,000 feet?). Since the city is supposed to spread out beyond the circular canal the circular canal doesn't have to be large enough to contain the largest possible medieval or ancient city.
A cothon is an artificial inner harbor in antiquity.
The cothon at Carthage was divided into a rectangular merchant harbour followed by an inner protected harbour reserved for military use only. This inner harbour was circular and surrounded by an outer ring of structures divided into a series of docking bays for ship maintenance, along with an island structure at its centre that also housed navy ships. Each docking bay featured a raised slipway. Above the raised docking bays was a second level consisting of warehouses where oars and rigging were kept along with supplies such as wood and canvas.
On the island structure, there existed a raised 'cabin' where the admiral in command could observe the whole harbour along with the surrounding sea. Altogether the inner docking complex could house up to 220 ships. The entire harbour was protected by an outer wall and the main entrance could be closed off with iron chains.4 Most records of Carthage were destroyed when the city was razed by the victorious Romans in the Third Punic War.
https://en.wikipedia.org/wiki/Cothon#The_harbours_of_Carthage
I think that sheds wide enough to hold a war galley would have to be separated by at least 20 to 40 feet, so the total circumference for 220 galleys would be about 4,400 to 8,800 feet. Dividing that by about half since some ships were docked on the island, and dividing that by pi, the diameter should have been about 700 to 1,400 feet. I don't know the size as revealed by archaeology.
Emperor Claudius constructed Portus, an artificial harbor and port city for Rome.
In AD 103, Trajan constructed another harbour farther inland — a hexagonal basin enclosing an area of 39 hectares (97 acres).
https://en.wikipedia.org/wiki/Portus#Trajanic_phase
Measuring on the map the hexagonal basin seems to be about 2,000 feet in diameter. And the Roman could have dug a circular basin about 2,000 feet in diameter as easily as a hexagonal one. And ring shaped basin with a center island would have been even easier to excavate.
[Added 12-12-2024]
People have been digging earthworks for many millennia for practical, religious, or prestige, purposes.
In prehistoric Europe there were many rings of standing stones. And many were parts of complexes with circular ditches which would sometimes fill with water after rain.
Circleville, Ohio, is mostly known for its Hitler family.
Circleville is named after its original layout created in 1810, which was based upon the circular Hopewell tradition earthwork within which the city was built. This earthwork measured 1,100 ft (340 m) in diameter, and was constructed in the early centuries of the Common Era. The county courthouse was built in the center of the innermost circle.
In the late 1830s, for various reasons, residents requested authorisation from the state legislature to change Circleville's layout to a standard grid format. This was accomplished by the mid-1850s. All traces of the Hopewell earthwork were destroyed, although hundreds of other monuments of its kind still remain in the Ohio Valley.
https://en.wikipedia.org/wiki/Circleville,_Ohio
The Newark earthworks in Ohio contain the Great circle and the Octagon.
The 1,200-foot (370 m)-wide Newark Earthworks Great Circle (located in Heath, OH) is one of the largest circular earthworks in the Americas, at least in construction effort. A 5-foot (1.5 m) deep moat is encompassed by walls that are 8 feet (2.4 m) high; at the entrance, the dimensions are even more grand.6
The Octagon Earthworks consists of an Observatory Mound (connected at the southwestern edge of Observatory Circle), Observatory Circle (20 acres), and the connected Octagon (50 acres). The Octagon has eight 550-foot (170 m)-long walls, from 5 feet (1.5 m) to 6 feet (1.8 m) high. The Octagon is joined by parallel walls to Observatory Circle .6
https://en.wikipedia.org/wiki/Newark_Earthworks
Obviously Hopewell culture societies had the manpower necessary to dig circular canals with diameters over 1,000 feet and the skill to create geometric earthworks including circular ones.
One form of earthwork is a "dyke", consisting of a ditch dug out of the ground and a mound of dirt from the ditch made into a wall. A defensive dike would have the ditch on the outside of the wall so enemies would have to climb down into the ditch and then on the inner side climb up the side of the ditch and then the side of the wall and often find a wooden palisade on top of the earth wall.
Obviously the ditch of a dyke would have at least a little water after it rained, and in some cases would always have water at the bottom and thus be a type of canal.
Many dykes were built as more or less straight lines on the border between two realms to serve as practical defenses and/or as obvious, impossible to miss, symbolic markers of the border.
Many thousands of such linear dykes were built in Europe over thousands of years from prehistory to the Middle Ages. And some of them were very long.
The Danevirke or Danework5 (modern Danish spelling: Dannevirke; in Old Norse: Danavirki, in German: Danewerk, literally meaning earthwork of the Danes6) is a system of Danish fortifications in Schleswig-Holstein, Germany. This historically important linear defensive earthwork across the neck of the Cimbrian peninsula was initiated by the Danes in the Nordic Iron Age about AD 650. It was later expanded multiple times during Denmark's Viking Age and High Middle Ages. The Danevirke was last used for military purposes in 1864 during the Second War of Schleswig.
The Danevirke consists of several walls, trenches and the Schlei Barrier. The walls stretch for 30 km, from the former Viking trade centre of Hedeby near Schleswig on the Baltic Sea coast in the east to the extensive marshlands in the west of the peninsula. One of the walls (named Østervolden), between the Schlei and Eckernförde inlets, defended the Schwansen peninsula.
https://en.wikipedia.org/wiki/Danevirke
The Great Fence of Thrace was a Medieval Bulgarian earthwork on the border with the Roman Empire, about 142 kilometers or 88 miles long.
https://bg.wikipedia.org/wiki/%D0%95%D1%80%D0%BA%D0%B5%D1%81%D0%B8%D1%8F
Hadrian's Wall in northern England is 73 miles or 117 kilometers long, and built of stone.
Just south of the wall there is a ten-foot (three-metre) deep, ditch-like construction with two parallel mounds running north and south of it, known as the Vallum.[26] The Vallum and the wall run more or less in parallel for almost the entire length of the wall, except between the forts of Newcastle and Wallsend at the east end, where the Vallum may have been considered superfluous as a barrier on account of the close proximity of the River Tyne.
https://en.wikipedia.org/wiki/Hadrian%27s_Wall
So the Vallum is a double dyke almost 73 miles or 117 kilometers long.
Offa's Dyke (Welsh: Clawdd Offa) is a large linear earthwork that roughly follows the border between England and Wales. The structure is named after Offa, the Anglo-Saxon king of Mercia from AD 757 until 796, who is traditionally believed to have ordered its construction. Although its precise original purpose is debated, it delineated the border between Anglian Mercia and the Welsh kingdom of Powys.5
https://en.wikipedia.org/wiki/Offa%27s_Dyke
Offa's Dyke Traditionally stretched for about 150 miles or 240 kilometers, but some archaeologists think that it only stretched 64 miles or 103 kilometers, and that other dykes north and south of it might or might not have been connected to Offa's Dyke.
So if a linear Earthwork including ditches could be that long, a fort could be surrounded by a dyke with a ditch with a long long total length. And in face many forts and towns were surrounded by dykes in ancient and medieval times.
Sometimes they had irregular plans based on the landscape, and sometimes they were roughly rectangular, and sometimes circular.
So I guess that some circular dykes were built around some prehistoric, ancient, and medieval, sites. And sometimes there would be some water in the bottom of the ditches, especially after it rained.
Ringforts or ring forts are small circular fortified settlements built during the Bronze Age, Iron Age and early Middle Ages up to about the year 1000 AD. They are found in Northern Europe, especially in Ireland. There are also many in South Wales and in Cornwall, where they are called rounds.3 Ringforts come in many sizes and may be made of stone or earth. Earthen ringforts would have been marked by a circular rampart (a bank and ditch), often with a stakewall. Both stone and earthen ringforts would generally have had at least one building inside.
https://en.wikipedia.org/wiki/Ringfort
And obviously the circular ditch of a earthen ringfort might usually be dry, but must sometimes have some water in it after it rained, and thus could be called a circular canal.
The Pannonian Avars (/ˈævɑːrz/ AV-arz) were an alliance of several groups of Eurasian nomads of various origins.2 The peoples were also known as the Obri in chronicles of Rus, the Abaroi or Varchonitai13 (Greek: Βαρχονῖται, romanized: Varchonitai), or Pseudo-Avars14 in Byzantine sources, and the Apar (Old Turkic: 𐰯𐰺) to the Göktürks.14 They established the Avar Khaganate, which spanned the Pannonian Basin and considerable areas of Central and Eastern Europe from the late 6th to the early 9th century.14
https://en.wikipedia.org/wiki/Pannonian_Avars
In what is now Hungary, the Avars built one or more circular ring forts, which have become legendary. In one medieval story their entire homeland was enclosed by a series of concentric circular walls, the outermost ones being hundreds of kilometer or miles in diameter. The Avar Ring, or Ring of the Avars, was their capital, filled with their loot, until captured by Charlemagne's armies. When I first heard of a book called The Lord of the Rings, I imagined that lord ruled a bunch of ringforts like the Avar Ring.
I don't know what the diameter of the real Avar Ring was, but if the Avars could construct a wall with a diameter of at least one kilometer or mile, they could have dug a circular ditch with a diameter of at least one kilometer or mile, and possibly with less effort than building a wall of that size.
Tens of thousands of castles were built in medieval Europe. And the early castles were built of earth and wood.
A motte-and-bailey castle is a European fortification with a wooden or stone keep situated on a raised area of ground called a motte, accompanied by a walled courtyard, or bailey, surrounded by a protective ditch and palisade.
https://en.wikipedia.org/wiki/Motte-and-bailey_castle
The bailey and its ditch could be irregular or have a geometrical shape, including a circular one, while the mound of the Motte was usually oval or circular, as was the ditch at the bottom of the mound.
So I guess that a country which had a lot of rather small circular ditches around mottes that at least sometimes had water in them could have built a single large circular ditch that at least sometimes had water in it with the same amount of effort.
Kenilworth Castle, Kenilworth, Warwickshire, England, is famous for its water defenses, being surrounded by water moats and large lakes. Kenilworth is an example of a water castle.
A water castle, sometimes water-castle,[a] is a castle where natural or artificial water is part of its defences.2 It can be entirely surrounded by water-filled moats (moated castle) or natural waterbodies such as island castles in a river or offshore. The term comes from European castle studies, mainly German Burgenkunde.49 When stately homes were built in such a location, or a Wasserburg was later rebuilt as a residential manor, the German term becomes Wasserschloss, lit. "water palace/manor".
https://en.wikipedia.org/wiki/Water_castle
And many water castles are surrounded by water much wider than the typical moat, and the lakes often have straight shorelines. So if people could built rectangular castes surrounded by rectangular lakes they could build circular castles surrounded by circular lakes.
[end of 12-12-2024 addition]
So if people wanted to dig a ring shaped canal for navigation, recreation, defense, prestige, or something, they could have dug one which was a few hundred to a few thousand feet in diameter.
Or maybe a mighty ruler planned to built a vast circular city tens of kilometers or miles in diameter surrounded by a great circular wall and a great circular moat. And first he built a giant outdoor model of his city at about 1/100 scale so the 100 foot tall wall was only 1 foot tall tall and the 300 foot wide moat was only three feet wide and it was easy to jump over the model moat and then step over the model wall.
And maybe the king never got to built his real city, but the model city remained and was preserved as a wonder of the world and a tourist attraction.
Or maybe a real giant circular city surrounded by a circular wall and moat was actually built and inhabited, and one time a wizard king captured that city and shrank it - like Brainic in the comic books did - and magically transported it back to his city in triumph and set it down in the royal gardens along with other enemy cities he had captured.
And so your villain comes to the comparatively tiny city with its circular moat which is probably still the widest circular canal in the world with a diameter of possibly hundreds or thousands of feet or meters. And he pours buckets of blood and barrels of blood into the tiny canal and then shrinks himself to the scale of the shrunken city.
And because of magical double talk the circular moat around the shrunken circular city is both hundreds of feet wide and deep and miles in diameter and maybe a foot or two wide and deep and a few hundred feet in diameter. To the people living in the city and the villain once he shrinks himself and enters the city the moat is still hundreds of feet wide and deep and miles in diameter. So perhaps through magical double talk the moat will be as magically effective as one miles in diameter would be.