After the death of Eochaid mac Ardgail (44 in the middle image below) in 1004 at the battle of Cráeb Tulcha, his dairfhine (extended family), took his name as their surname, Ó hEochaidh.
Donnsleibhe Ó Heochaidh (56) was the first king to use the surname.
One of Eochaid mac Ardgail's sons ruled 47 years and preferred Niall mac Eochaid as his name in the older fashion. The first mention of the Ó hEochaidh as a surname was in 1019, when Niall mac Eochaid blinded his cousin(?) Flagherty Ó hEochaidh to prevent him from becoming king.
"This is indeed an actual, verified, historic, no-doubt-about-it royal dynasty." - from IrishTribes.com.
The King of Ulidia led an array, A.D. 968, against the foreigners (Vikings), he succeeded in plundering Connor, which was then in their possession, but he lost many of his followers - " he left behind a number of heads." A.D. 976. The King of Ulidia was slain in the battle of Killniona in which he was assisting Donnell O'Neill, monarch of Ireland, against the Southern Hy Niall and the Danes; he was succeeded by Aodh, son of Longseach, a former King ; and this Aodh perished, A.D. 978, in a war which he waged against the Dalaradians. Eochaidh, the son of Ardgal, a former King, then mounted the throne, and in the following year, in conjunction with the monarch Maolseachluin, or Malachy, he laid seige to Dablin, out of which they liberated two thousand Irish prisoners and took a large amount of rich spoils. The King of Ulidia went, A.D. 989, on an expedition into Kinel-Owen, where he lost O'Haidith one of his chiefs. Hugh O'Neill, King of the Kinel-Owen, plundered Iveagh, A.D. 998, and carried off a great cattle spoil. Sitric, the Dane, A.D. 1001, set out on a plundering excursion into Ulidia, in his ships, and plundered Kilclief and Inch and carried off many prisoners.
Brian Boroimhe (Boru), having conceived the ambitious project of deposing the monarch, Malachy, obtained the aid of the Danes and Leinstermen against him. Malachy gave him hostages, or in other words, acknowledged him monarch ; and the people of Connaught also acknowledged his authority. Brian, accompanied now by the deposed monarch and a great force, marched to Dundalk to compel the northern Hy Nialls to acquiesce in the revolution, but Hugh O'Neill, who as King of the Kinel-Owen, was the pre-sumptive heir to the monarchy, and Eochaidh, King of Ulidia, with the whole force of the Kinel-Connell and the Clann Colla " repaired to the same place to meet them, and did not permit them to advance further."
It would seem, however, that the Ulidians were inclining to join Brian against their hereditary enemies, the Hy Nialls, for in the following year, A.D. 1003, the Kinel-Owen invaded Ulidia and defeated the Ulidiansin the terrible battle of Craebh-tulcha (Creeve-tulcha). In this battle Eochaidh, King of Ulidia fell, together with his two sons, his brother, many of the chiefs, including Gairbhidh (Garviy), lord of Iveagh, " and the most part of the Ulidians."
The fall of their King left the Ulidians a prey to dissensions; and the jealousy entertained against them by the Kinel-Owen, lest they would join with Brian, subjected them to many an invasion. In 1006, Niall, son of Duibhthuine (Duffin), son of Eochaidh, who was killed at Crabh-Tulcha, had scarcely mounted the blood-stained throne when the O'Neill invaded Ulidia three times.
Niall, however, had even a worse enemy to contend with, his uncle Niall, the son of the Eochaidh, who was killed at the battle of Craobh-Tulcha. This prince encountered the King of Ulidia, A.D. 1011, in the battle of the Mullachs, where many were slain, he afterwards deposed the king, and took possession of the throne of Ulidia. Niall was threatened, A.D. 1019, by the ambition of another rival, perhaps a brother of his own, one Flagherty O'Heochaidh, but he prevented the ambition of that rival from again disturbing his reign by blinding him, for according to Irish law, no one having a personal blemish could ascend an Irish throne. Niall, A.D. 1022, defeated the Danes off Dublin in an naval engagement, in which he took most of their ships.
Niall, son of Eochaidh, King of Ulidia, and his son, Eochaidh, died on Thursday, September 13th, 1062. It is from this Eochaidh that the family of O'Haughey or O'Hoey is descended and takes its name.
Niall had reigned fifty-six years ; he was succeeded by his brother Eochaidh, who died the following year, 1063. Donnsleibhe (Donlevy) O'Heochaidh, then mounted the throne; he went, A.D. 1080, into Munster " with the chiefs of Ulidia along with him to serve for wages." He went on a similar expedition, A.D. 1084, to Drogheda. Donnsleibhe O'Heochadha, after a reign of twenty-four years was slain, A.D. 1094, by Domhnall MacLoughlin, King of Aileach or Kinel-Owen, in the parish of Killelagh, Co. Derry. An army was led by Domhnall (Donnell) MacLoughlin, A.D. 1099, into Ulidia, to compel the Ulidians to acknowledge him as king of Ireland ; for at that period the Ulidians, through hereditary hatred of the Hy Niall race, were prepared to support the pretensions of his rival, Muirchertach O'Brian. MacLoughlin's army found that "the Ulidians were encamped before them at Craebh Tulcha (Crew Hill) . On coming together, the hosts press the battle on each other. Both the cavalries engage. The Ulidian cavalry was routed. After this, the Ulidians left the camp, and the Clanna-Neill burned it, and cut down (the tree called) Craebh Tulch." This was the sacred tree under which the kings of Ulidia were inaugurated. Afterwards the Ultonians were forced to deliver to them two hostages, and the Abbot of Bangor as security for two hostages more.
After this victory, the Kinel-Owen and the Kinel-Connell returned home laden with spoils, including "the royal tent, the standard, and many other precious jewels." This year, " Maghnus, King of Lochlann (Denmark) and the Islands, and a man who had contemplated the invasion of all Ireland, was slain by the Ulidians with a slaughter of the people about him." He was slain in the vicinity of Downpatrick, where his tomb is still pointed out. The Ulidians defeated, A.D. 1104, the Dalaradians, and slew a chief named O'Daimhin. This year again, MacLoughlin compelled the Ulidians to give him hostages. The king of Ulidia, Eochaid (Eoghy) MacDonlevy O'Heochaidh (O'Haughy) was beheaded, A,D. 1108, by two of his chiefs, O'Mathghamhna (O'Mahony) and O'Maelruanaidh (O'Mulroouey).
After this event there is a considerable confusion among the Annalists regarding the successor ; it seems, however, from the Four Masters, that Donnchadh O'Heochaidh was the next king, though MacFirbis says, that Aodh, son of Donlevy O'Heochaidh was the succeeding king. MacLoughlin again returned to Magh-Cobha (Moy-Cova), and compelled the Ulidians to give him three hostages, which he selected. Nevertheless, the Ulidians led an army, A.D. 1111, to Tullaghoge, and " cut down its old trees," under which the princes of the Kinel-Owen were inaugurated. To avenge this insult, Niall O'Loughlin or MacLoughlin, then only twenty years of age, marched into Ulidia, and carried off three thousand cows. After this, a conference between Donnell MacLoughlin and Donnchadh O'Heochaidh was held, at which the Ulidians delivered hostages "for paying him his own demands." " The peace and friendship " was of short duration. MacLonghlin, probably offended at some breach of the treaty, returned, A.D. 1113, and banished Donnchadh from the kingdom of Ulidia, which he divided between Aedh O'Mahony and Niall, son of Donlevy O'Heochy. He was, however, blinded the same year by Eochaidh O'Mahony and the Ulidians. A.D. 1118, the people of Iveagh suffered a severe defeat from Murchadh O'Rogan, at a place called Ceann-dara. Donnell MacLoughlin died, A.D. 1121; and was succeeded in the chieftainship of the Kinel-Owen by his son, Conchobhar or Connor, who, in 1122, marched with the Kinel-Owen " until they arrived at Cill-ruaidh (Kilroot) in Ulidia, and they carried off countless cattle spoils." Niall MacDonlevy O'Heachaidh about this time founded the abbey of Erenagh.
An intestine war occurred, A.D. 1127, among the Ulidians, in which Aedh O'Mahony and Niall MacDonlevy O'Heochaidh, the two kings set over them by Donnell MacLoughlin, were slain. Ceinneidigh (Kennedy), son of Aedh MacDonlevy, assumed the sceptre, but he was slain the next year, A.D. 1128, and Raghnall (Ranall) O'Heochaidh succeeded. The chief men of Ulidia afterwards came to Armagh, where they made peace witli Connor MacLoughlin, and left hostages with him. In consequence of these arrangements, the Ulidians accompanied Connor MacLoughlin, A.D. 1131, on an expedition to Connaught, but during their absence, Tighearnan O'Rorke plundered Ulidia. The plunderers were met in the present county of Louth by the Ulidians on their return home, and in an engagement which took place between them, Raghnall (Ranall) O'Heochaidh, King of Ulidia was killed. The Ulidians led an army, A.D. 1139, to Tullach-og, where the princes of the Kinel-Owen were inaugurated, and " they burned the plain and its churches."
A.D. 1147, "an army was led by Muircheartach (called in English Murtaugli), son of Niali O'Loughlin or MacLoughlin, and the Kinel-Owen, and Donuchaidh Ua Cearbhail (Donnough O'Carrol), and the Airghialla (the Oriols) into Ulidia. The Ulidians were encamped at the brink of Uchdearg (Aghderg, near Loughbrickland), to meet them ; but they abandoned the camp to the Kinel-Owen and the Airghhialla, who pursued them till they reached the shore of Dun-droma (Dundrum), in Lecale. The Ulidians gave battle there, on the day of festival of Paul and Peter (29th of June) ; but they were defeated, and a great number of them slain. MacLoughlin and O'Carroll returned to Ulidia and carried off hostages and the son of the king of Ulidia, and placed four lords over the territory. The Ulidians, however, having detatched O'Carroll from the Kinel-Owen interest, forgot their engagements, but MacLoughlin returned across Toome, expelled Cuuladh O'Donlevy or O'Heochaidh, and placed Donnchadh, a prince of the same family, on the throne. Peace was afterwards made at Armagh between MacLoughlin, O'Carroll, and the Ulidians " under the staff of Jesus (St. Patrick's crozier), and in the presence of the successor of Patrick and his clergy," and they left hostages with MacLoughlin. In the following year, A.D. 1149, the expelled Cuuladh returned to Ulidia and drove off Donnchadh from the chieftainship of the upper part of Ulidia. Donnchadh, assisted by his brother, Murchadh, and O'Mahony attacked the camp of Cuuladh, but they were defeated. After this the combined forces of the Kinel-Owen, Kinel-Connell, and Oirghialla entered Ulidia, and plundered all the upper part of it. Cuuladh then delivered his own son to MacLoughlin, and whatever other hostages he demanded. Muircheartach (Murtough) O'Loughlin or MacLoughlin, who had inflicted such injuries on Ulidia, became the unopposed monarch of all Ireland in the year 1156, wlien Turlough O'Connor, his rival, closed his turbulent career in death, nevertheless the Ulidians rebelled, and the monarch led an army to chastise them. Cuuladh, son of Aedh, son of Donlevy O'Heochaidh, King of Ulidia, A.D. 1157, "died after penance at Dun-da-leathglas, and was interred at Dun (Down) itself." Aedh, the brother of Cuulath succeeded him : he was slain by the Kinel-Connell, A.D. 1158, when he invaded their country along with the army of Kinel-Owen. After this event, Eochaidh MacDonlevy O'Heochaidh became king. Because this king, A.D. 1165, plundered some of the neighbouring territories, the monarch led a great army against him, which plundered the whole country, except some of the principal churches, and deprived Eochaidh of the kingdom. Some time afterwards Donnchadh Ua Cearbhaill (O'Carroll), lord of Oirghialla (Oriel), brought Eochaidh to the monarch at Armagh, and requested that he would again restore him to his kingdom. The monarch restored him, but Eochaidh was necessitated to deliver to him Bairche (the present barony of Mourne) to O'Longhlin, who immediately granted it to O'Cearbhaill. Nevertheless, on the very next year, A.D. 1166, this unfortunate King of Ulidia, "Eochaidh MacDuinsleibhe, pillar of the prowess and hospitality of the Irish, was blinded by (the monarch) Muircheartach Ua Lochlainn ; and the three best men of the Dial-Araidhe, i.e. two MacLoingsighs, and the grandson of Cathasach O'Flathrae, were killed by the same king, in violation of the protection of the successor of Patrick and the staff of Jesus, of Donnchadh O'Cearbhaill,". This so provoked 0'Carroll, the Ulidians, and others, that they invaded Kinel-Owen, and slew Murtough MacLoughlin. As Eochaidh, being blinded, could no longer reign over Ulidia, Maghnus O'Heochaidh succeeded him, and Ruaidhri (Rory) O'Connor succeeded MacLoughlin in the monarchy.
O'Connor, A.D. 1167, convened an assembly of the clergy and chiefs of the North of Ireland at Athboy, at which there were present thirteen thousand horsemen, of whom O'Carrol and O'Heochaidh brought four thousand. The Annalists describe the character of Maghnus O'Heochaidh, King of Ulidia, as stained with every crime of immorality and irreligion. At the instigation of a renegade monk, who had been expelled from Melifont, he drove out, A.D. 1170, the monks, whom St. Malachy had placed in the abbey of Saul, and deprived them of thier books and all their goods. The Ulidians fitted out a fleet, A.D. 1171, with which they invaded the territory of the Kinel-Owen, and carried off a countless number of cows. In revenge, Niall MacLoughlin entered Ulidia where he slew many, and carried off countless cows. The king of Ulidia led a predatory force into Cuil-an-Tuaisceart (in the north-east Liberties of Coleraine), where they plundered Coleraine, and many other clivirches ; but a small party of the Kinel-Owen under Conchobhair O'Cathain (Conchovar O'Kane) overtook them, and slew twenty-one chieftains and sons of chiefs, together with many of ths commonality ; the king, though wounded, escaped from the battle, but he was slain a few weeks afterwards in Downpatrick by his own brother, Donnsleibhe (Donlevy), who succeeded him in the kingdom.
John de Courcy, one of the military adventurers, who had come to Dublin along with the English invaders, seeing the extensive estates, which his companions had gained in other parts of Ireland, determined to try his fortune in Ulster, which had not yet been invaded. Having selected 22 knights and 300 soldiers, he set out from Dublin in the month of January, A.D. 1177, and in four days arrived at Downpatrick. The utmost terror filled the inhabitants at the sight of these adventurers, who immediately commenced to slaughter the townspeople and plunder the town. Cardinal Vivian, who had come as legate from Pope Alexander III. to the nations of Scotland and Ireland, had recently arrired from the Isle of Man, and happened to be then in Downpatrick ; the Cardinal entreated De Courcy in vain to spare a people who were willing to submit to the King of England and to pay tribute. These terms were scornfully rejected by De Courcy, and the Cardiiaal encouraged Rory, son of Donlevy O'Heochaidh, who was the prince of Ulidia to defend his people. He, it -is said, collected ten thousand men in one week to deliver Down from the tyranny of the English, but it is obvious that the numbers are greatly exaggerated. De Courcy took up a favourable position outside the town and attacked with his usual bravery this tumultuary gathering ; panic seized the Ulidians and they were mercilessly slaughtered by the trained soldiers and the mail-clad Norman knights. On the 24th of the following June, the Ulidians, assisted by the Kinel-Owen, again tried the fortune of war against De Courcy with the same want of success. In the following year, after a successful predatory incursion into the present county of Louth, De Courcy encamped, on his return to Down, in the valley of the Newry river, when he was attacked by O'Carrol of Oriel, and MacDonlevy of Ulidia, and he lost 450 men.
Notwithstanding the presence of an enemy so powerful, the natives still continued their petty feuds. Donnell MacLoughlin, A.D, 1181, led the Kinel-Owen into Ulidia and defeated the Ulidians, under their King, Rory MacDonlevy. The Kinel-Owen, who by their continual invasions had rendered the Ulidians unable to resist the English, were the only Ulster state able to cope with the foreigners, yet they also were miserably divided.
The Annals of Inisfallen, at A.D. 1200, in recording the death of Rory MacDonlevy O'Heochaidh by De Courcy, style him "the last King of Uladh." Thus perished that ancient dignity with its degenerate possessor.