The Black Pig's Dyke (Irish: Claí na Muice Duibhe) or Worm's Ditch (Irish: Claí na Péiste) is a series of discontinuous linear earthworks in southwest Ulster and northeast Connacht, Ireland. Remnants can be found in north County Leitrim, north County Longford, County Cavan, County Monaghan and County Fermanagh (see the map below). Sometimes, the Dorsey enclosure in County Armagh and the Dane's Cast in County Down are considered to be part of the dyke.
Similar earthworks can be found throughout Ireland, although the Black Pig's Dyke is the best known. A notable example is the Claidh Dubh ("black ditch"), anglicised Clyduff or Cleeduff, in eastern County Cork. It has three sections, the longest of which runs north-south for 24 kilometres (15 mi) from the Ballyhoura Hills to the Nagle Mountains.
In counties Leitrim and Cavan the earthworks are generally called the Black Pig's Dyke or Dike. In County Longford it is called the Black Pig's Race, while in the Cavan–Monaghan border area it is called Black Pig's Dyke or Worm Ditch. The ditches take their names from Gaelic folklore. One tale says that a huge black boar tore up the countryside with its large tusks. Another says that the ditches were made by a huge worm.
The earthworks usually consist of a bank with a ditch on either side. The bank is usually about 9 metres (30 ft) wide and the ditches are usually about 6 metres (20 ft) deep. Excavation of a stretch in County Monaghan revealed that the original construction was of a substantial timber palisade with external ditch. Behind the palisade was a double bank with intervening ditch. The timber structure was radiocarbon-dated to 390–370 BCE, so all of the earthworks may date to that period. Such dates confound the once popular theory that the earthworks were made in imitation of the Roman frontier in northern Britain.