Magh Luirg or Magh Luirg an Dagda, Anglicised as Moylurg, was the name of a kingdom located in the north-east of Connacht, the western province of Ireland, from c. 956–1585. The Kings of Moylurg were a branch of the Síl Muiredaig, who were themselves of the Uí Briúin Ai who descended from The Connachta.
Moylurg is, in Irish, Magh Luirg an Dagda, the plain of the tracks of the Dagda. The Dagda was an ancient Irish deity.
The kingdom's first king, Maelruanaidh Mor mac Tadg, was a son of Tadg mac Cathal (King of Connacht 925–956) and brother to Conchobar mac Tadg, who succeeded as king in 967. Maelruanaidh is said to have made a deal of some nature where, in return for abandoning any claim to the provincial kingship, he would be given Moylurg. His dynasty were known as the Clan Mulrooney (later known as Clan MacDermot), cousins to O'Connor, who was then High King of Ireland. This royal connection was exploited to oust the existing chieftains of Moylurg, the MacReevys (Irish: Mac Riabhaigh, later anglicized spelling McGreevy).
There are very few clues as to the exact point in time when the MacRiabhaighs (MacReevys/McGreevys) were dispossessed of their ancestral lands by the McDermots or to a controversy which precipitated the action. Modern sources are not much help. Clearly the dispossession occurred earlier than was speculated by Sir Cecil King-Harmon in 1958 (c. 1400) or the Roscommon Herald in 1959 (c. 1300). The statement on the McGreevy Stone in Ardcarne Cemetery (erected in the 20th century, c. 1930) that the MacRiabhaighs (MacReevys/McGreevys) were "kings of Moylurgh . . . until 1255" may be the most reliable, and also is consistent with the statement by the Irish genealogical authority Edward MacLysaght ("More Irish Families") that the McGreevys were "lords of Moylurg . . . until the 13th century, when they were subdued by, and become tributary to the McDermots".