Some of the earliest evidence of moats has been uncovered around ancient Egyptian castles. One example is at Buhen, a castle excavated in Nubia. Other evidence of ancient moats is found in the ruins of Babylon, and in reliefs from ancient Egypt, Assyria, and other cultures in the region.
Evidence of early moats around settlements has been discovered in many archaeological sites throughout Southeast Asia, including Noen U-Loke, Ban Non Khrua Chut, Ban Makham Thae and Ban Non Wat. The use of the moats could have been either for defensive or agriculture purposes.
Moats were excavated around castles and other fortifications as part of the defensive system as an obstacle immediately outside the walls. In suitable locations they might be filled with water. A moat made access to the walls difficult for siege weapons, such as siege towers and battering rams, which needed to be brought up against a wall to be effective. A water-filled moat made the practice of mining, digging tunnels under the castles in order to effect a collapse of the defences, very difficult as well. Segmented moats have one dry section and one section filled with water. Dry moats cut across the narrow part of a spur or peninsula are called neck ditches. Moats separating different elements of a castle, such as the inner and outer wards are cross ditches.
The word adapted in Middle English from the Old French motte "mound, hillock" and was first applied to the central mound on which a castle was erected (see Motte and bailey), and then came to be applied to the excavated ring, a "dry moat". The shared derivation implies that the two features were closely related and possibly constructed at the same time. The term moat is also applied to natural formations reminiscent of the artificial structure, and to similar modern architectural features.
Later western fortification
The 17th-century fortified town of Naarden
, showing bastions projecting into the wet moat
With the introduction of siege artillery, a new style of fortification emerged in the 16th century using low walls and projecting strong points called bastions, which was known as the trace italienne. The walls were further protected from infantry attack by wet or dry moats, sometimes in elaborate systems. When this style of fortification was superseded by lines of polygonal forts in the mid-19th century, moats continued to be used for close protection.
The Walls of Benin were a combination of ramparts and moats, called Iya, used as a defense of the capital Benin City in present-day Edo State of Nigeria. It was considered the largest man-made structure lengthwise, second only to the Great Wall of China and the largest earthwork in the world. With more recent work by Patrick Darling, it has been established as the largest man-made structure in the world, larger than Sungbo’s Eredo. It enclosed 6,500 km2 of community lands. Its length was over 16,000 km of earth boundaries. It was estimated that earliest construction began in 800 and continued into the mid-15th century.
The walls are built of a ditch and dike structure; the ditch dug to form an inner moat with the excavated earth used to form the exterior rampart.
The Benin Walls were ravaged by the British in 1897. Scattered pieces of the walls remain in Edo, with material being used by the locals for building purposes. The walls continue to be torn down for real estate developments.
The Walls of Benin City were the world's largest man-made structure. Fred Pearce wrote in New Scientist:
"They extend for some 16,000 kilometres in all, in a mosaic of more than 500 interconnected settlement boundaries. They cover 6,500 square kilometres and were all dug by the Edo people. In all, they are four times longer than the Great Wall of China, and consumed a hundred times more material than the Great Pyramid of Cheops. They took an estimated 150 million hours of digging to construct, and are perhaps the largest single archaeological phenomenon on the planet."
Japanese castles often have very elaborate moats, sometimes with many moats laid out in concentric circles around the castle and a host of different patterns engineered around the landscape. Japanese castles will have up to three of these concentric moats. The outer moat of Japanese castles typically protects other support buildings in addition to the castle.
As many Japanese castles have historically been a very central part of their respective city, the moats have provided a vital waterway to the city. Even in modern times, the moat system of the Tokyo Imperial Palace comprises a very active body of water, hosting everything from rental boats and fishing ponds to restaurants.
Most modern Japanese castles have moats filled with water, but castles in the feudal period more commonly had 'dry moats' karabori (空堀 【からぼり】, lit. "empty moat"), a trench. A tatebori (竪堀 【たてぼり】, lit. "vertical moat") is a dry moat dug into a slope. A unejo tatebori (畝状竪堀 lit. "furrowed shape empty moat") is a series of parallel trenches running up the sides of the excavated mountain, and the earthen wall, which was also called doi (土居 【どい】, lit. "earth mount"), was an outer wall made of earth dug out from a moat. Even today, it is common for mountain Japanese castles to have dry moats. A mizubori (水堀 【みずぼり】, lit. "water moat") is a moat filled with water.
Moats were also used in the Forbidden City and Xi'an in China; in Vellore in India; Hsinchu in Taiwan; and in Southeast Asia, such as at Angkor Wat in Cambodia and Chiang Mai in Thailand.
The only moat fort ever built in Australia was Fort Lytton in Brisbane. As Brisbane was much more vulnerable to attack than either Sydney or Melbourne, a series of coastal defenses were built throughout Moreton Bay, with Fort Lytton the largest of these defenses.
Built between 1880–81, in response to fear of a Russian invasion. It is a pentagonal fortress concealed behind grassy embankments, and surrounded by a water-filled moat.
While moats are commonly associated with European castles, they were also developed by North American Indians of the Mississippian culture as the outer defence of some fortified villages. The remains of a 16th-century moat are still visible at the Parkin Archeological State Park in eastern Arkansas. Further, the term moat was used to describe dry ditches surrounding forts built by colonials or Americans to protect important landmarks, harbors, or cities (see: Fort Jay on Governors Island).
The Mayans also used moats in the city of Becan.