"Submission was paid to Lug, to the hero, for two score years famous, fair; melancholy the deed which Mac Cuill wrought the death of the grandson of Dian Cecht in Caindruim (law hill)"
Lug as supreme judge and enforcer of the cosmic and moral order is likely not the first impression one gets of a multi-skilled warrior-king, but I am increasingly convinced it is correct. As Georges Dumezil suggested several decades ago now, Lug is effectively a type of Celtic Varuna, associated with rains, winds, waters, fierce inspiration, the dawn and setting sun, the night sky, kingship, law, judgement, and death.
Dian Cecht, grandfather of Lug, is sometimes thought to mean swift concoctions or swift plough but may actually mean "swift judge". It is this notion they are bringing to bear in the example above. Add to this that Lug's name most likely originates from the Proto-Indo-European word for an oath,*Loughjom, thus making him the god of contract, binding, and legal pronouncements. In modern Gaelic the word for to swear is still *Lughadh and in Irish, *Luighe. In surviving myths of Lug, we often see him administering oaths, whether to Bres, the children of Tuireann, and indeed to the other Tuatha de Dannan, as he has them commit to specific divine functions to perform in the battle, and likely at all times, helping to distinguish and differentiate the gods. When he takes his place in Tara after proving himself to Nuada, he is named Ard Ollam, making him a bard who is equal to the king himself and often partakes in matters of law for his is a master of the arts and the knowledge of customs and history. After he becomes king, Loch Leithglas tells him that from this time all matters of dispute will be settled by him, that the Fomorians will not be allowed to rise up from the sea, and then sings a hymn about how Lug has fastened Ireland, ordered things and established the law.
If we examine the details around Lug's death, this is likewise in regards to enforcing law and justice, and Lug's justice is often deadly. He kills the sons of Tuireann for the crime of murder. He is said to poison Bres at the behest of Nuada by poisoning him. Yew poison was noted by ancient Romans to be a form of suicide used by Celtic elite when facing defeat, and perhaps it was also administered to some sentenced to death. He kills Cermait, son of the Dagda, for violating his wife. Now, as it turns out, we are told that Cermait did not in fact violate his wife, but that Lug was somehow tricked into believing so. Thus, this error in judgement is the catalyst for his downfall, for it was a false pronouncement. The myths of kings show us that one loses legitimacy once a false judgement has been made. It is expressed that this wrong judgement was not Lugh's fault, but it is used to give sanction to Mac Cuill to overthrow him, which most sources lament as a terrible deed. Now Lug does not in fact actually die, but this is symbolic of his overthrow from the status of king of the gods. Mac Cuill and his brothers must then be subsequently overthrown by the Milesians in a type of disguised revenge plot. The Milesians are in fact just another subsection of gods who play the roll as ancestors to the Gaels and likely cosmologically all humans, but that is for another post.
Lug is strongly associated with music. However, song and chant was also connected to the pronouncement of law in ancient Ireland. It is very likely that legal decrees in the pre-Christian period were chanted or sung in order to ensure it's truthfulness and purity. A prime example of this is the word "càin". This refers to the law. Ar-càin means to chant, sing, perform a magic spell or make a legal pronouncement. For-càin means to teach or make a prophecy. Druim refers to a high place like a hill, ridge, or the crest of a wave. Given that legal pronouncement were made from hills or other high places, this name effectively means ridge/hill of law. Archaeology tells us that high hills near human settlements and connected with water were sacred to Mercury in Gaul, and this is most likely for the same reason. These were also the locations of hill forts, where tribal leaders would store wealth, rule from, and make their legal pronouncements to the tribe.
Thus, Lug, the enforcer of rta, was killed upon the summit from which he made judgement.