As the Germanic migrations of the fifth century were plunging much of Europe into the darkness of the unknown a remote island in the far west becomes faintly illuminated to history. Ireland had never been part of the Roman empire but Latin Christianity and script had been introduced to it by the fifth century enabling the Irish language to flower and produce the oldest body of vernacular literature in Europe. By the seventh century we find the received corpus of religious, classical and annalistic texts in Latin joined by a native corpus of texts in Irish in genres of law, genealogy, wisdom and narrative that incorporate elements of latinate Christian culture without being subsumed by it. It is this early and culturally self-confident literacy with its closely intertwined classical and native strands emanating from secular as well as ecclesiastical schools that most distinguishes medieval Ireland from other regions of the Christian West. Of present interest this literary tradition transmits to us an unparalleled body of genealogical documents, documents that allow us to trace the MacLochlainn origin with confidence to a person living in late antiquity.
The surname MacLochlainn has been anglicised into a variety of forms in recent times but remains in substance a phrase in Irish composed of the words mac ('son') and the personal name Lochlainn in genitive form ('of Lochlainn') having the meaning son of Lochlainn and so suggesting genealogical descent from an eponym. The medieval Irish genealogies allow us to identify the eponymous ancestor of the MacLochlainns of Inishowen as a person named Lochlainn who flourished in the early eleventh century, though little else is known of him. As a personal name Lochlainn would seem to have been a borrowing of the genitive form of the placename Lochlann ('of Lochlann') or perhaps the dative form ('to/in/from/with Lochlann'). The placename Lochlann appears to have been the name of a mythological land of supernatural adversaries believed by the early Irish to exist in the far northern regions of the world. By the eleventh century Lochlann had become identified with Norway but it does not follow that a person named Lochlainn at this time was Norse or that MacLochlainn means son of the Norseman (both of which are common misconceptions). While his personal name may indicate maternal Norse ancestry (though the sources are silent on this) the genealogies show that paternally Lochlainn belonged to a powerful Irish dynasty known as the Cenél nEoghain ('People of Eoghan') who traced their male line back to Eoghan son of Niall Noígiallach ('Niall of the Nine Hostages'). In its earliest surviving regnal list Niall is shown as holding the nationally important sacral kingship of Tara around the middle of the fifth century. Placed in close synchronism with such figures as the semi-legendary king Merovech of France, the legendary king Uther Pendragon of Britain and the legendary king Hrothgar of Denmark it should come as no surprise to find Niall as a liminal and enigmatic figure inhabiting the twilight world of the early narrative literature. The cycle of stories concerning his precarious birth, his evil step-mother, his amorous forest liaison with a sovereignty goddess and his death in continental Europe are literary rather than historical but shorn of these legendary trappings his bare historical existence (and nothing more) is attested in the considerable footprint left by a dynasty known as the Uí Néill ('Descendants of Niall') in the texts of contemporaneously written annals and saints' lives surviving from the sixth century onwards. The political geography disclosed in these sources indicates that an Eoghan son of Niall known to have died in 465 conquered a kingdom in Inishowen (Inis Eoghain, 'Island of Eoghan') having a caput at the Grianan of Aileach (pictured above) and a territory so expanded by his descendants that by the eleventh century the leader of the Cenél nEoghain was effective ruler of the north of Ireland. In parallel with this territorial expansion the Cenél nEoghain widened genealogically to become the dominant segment within the Uí Néill before itself fragmenting into competing genealogical segments, those segments discarded from contention for the kingship going on to form a secondary tier of secular and ecclesiastical nobility within the kingdom and its dependent territories.
In early medieval Ireland individuals did not bear family surnames but were instead known by their personal name with an epithet or patronymic attached in order to aid identification. Patronymics naturally changed from generation to generation as they tracked the personal name of the father but from the tenth century onwards the newly emerging genealogical segments began to fix patronymics as surnames in order to mark a more exclusive descent from a more recent common ancestor and so set themselves apart from the wider dynasty. This process can be seen at work in the Cenél nEoghain genealogy causing it to become narrow and stem-like, tracking only the leading segments, so that by the eleventh century we find the kingship confined to the contending dynasties of Clann Néill ('Family of Niall'), who had migrated to Tullaghoge in the south of the expanded kingdom, and Clann Domhnaill ('Family of Domhnall') who remained in Inishowen. Lochlainn was a member of Clann Néill and so likely bore the surname O Neill marking his descent from the tenth century eponym Niall Glúndubh ('Niall of the Black-knee') from whom only Clann Néill could claim descent. Following normal practice the patronymic mac Lochlainn became attached to Ardghal son of Lochlainn but in the late eleventh century a more exclusive surname emerged when the patronymic became fixed upon its attachment to Domhnall son of Ardghal son of Lochlainn. In becoming divorced from its literal meaning son of Lochlainn the patronymic mac Lochlainn had transformed into MacLochlainn, a fixed surname to be passed from generation to generation within a compact new dynasty descending from Lochlainn.