"true or faithful in allegiance," 1530s, in reference to subjects of sovereigns or governments, from French loyal, from Old French loial, leal "of good quality; faithful; honorable; law-abiding; legitimate, born in wedlock," from Latin legalem, from lex "law" (see legal).
Identical with legal, which maintains the Latin form; in most uses it has displaced Middle English leal, which is an older borrowing of the French word. For the twinning, compare royal/regal. Sense development in English is feudal, via notion of "faithful in carrying out legal obligations; conformable to the laws of honor." In a general sense (of dogs, lovers, etc.), from c. 1600. As a noun meaning "those who are loyal" from 1530s (originally often in plural).
c. 1400, from Old French loialte, leaute "loyalty, fidelity; legitimacy; honesty; good quality" (Modern French loyauté), from loial (see loyal). The Medieval Latin word was legalitas. The earlier Middle English form was leaute (mid-13c.), from the older French form. Loyalty oath first attested 1852.
Allegiance ... is a matter of principle, and applies especially to conduct; the oath of allegiance covers conduct only. Loyalty is a matter of both principle and sentiment, conduct and feeling; it implies enthusiasm and devotion .... [Century Dictionary, 1897]
mid-15c. "of or pertaining to the law," from Old French légal "legal" (14c.) or directly from Latin legalis "pertaining to the law," from lex (genitive legis) "an enactment; a precept, regulation, principle, rule; formal proposition for a law, motion, bill; a contract, arrangement, contrivance." This probably is related to legere "to gather," from PIE root *leg- (1) "to collect, gather," with derivatives meaning "to speak (to 'pick out words')." Perhaps the noun is from the verb on the notion of "a collection of rules," but de Vaan seems to imply that the evolution is the reverse:
The verb legare and its compounds all have a meaning which involves a 'task, assignment,' and can therefore be interpreted as derivatives of lex 'law.' The [Proto-Italic] root noun *leg- 'law' can be interpreted as a 'collection' of rules. Whether the root noun existed already in PIE is uncertain for lack of precise cognates.
Sense of "permitted by law" is from 1640s. Related: Legally. Not etymologically related to law (n.), q.v. The usual Old French form was leial, loial (see leal, loyal). Legal tender "money which the creditor is bound by law to accept" is from 1740 (see tender (n.2)). A legal holiday (1867) is one established by statute or proclamation and during which government business is usually suspended.
Proto-Indo-European root meaning "to collect, gather," with derivatives meaning "to speak" on the notion of "to gather words, to pick out words."
It forms all or part of: alexia; analects; analogous; analogue; analogy; anthology; apologetic; apologue; apology; catalogue; coil; colleague; collect; college; collegial; Decalogue; delegate; dialect; dialogue; diligence; doxology; dyslexia; eclectic; eclogue; elect; election; epilogue; hapax legomenon; homologous; horology; ideologue; idiolect; intelligence; lectern; lectio difficilior; lection; lector; lecture; leech (n.2) "physician;" legacy; legal; legate; legend; legible; legion; legislator; legitimate; lesson; lexicon; ligneous; ligni-; logarithm; logic; logistic; logo-; logogriph; logopoeia; Logos; -logue; -logy; loyal; monologue; neglect; neologism; philology; privilege; prolegomenon; prologue; relegate; sacrilege; select; syllogism; tautology; trilogy.
It is the hypothetical source of/evidence for its existence is provided by: Greek legein "to say, tell, speak, declare; to count," originally, in Homer, "to pick out, select, collect, enumerate;" lexis "speech, diction;" logos "word, speech, thought, account;" Latin legere "to gather, choose, pluck; read," lignum "wood, firewood," literally "that which is gathered," legare "to depute, commission, charge," lex "law" (perhaps "collection of rules"); Albanian mb-ledh "to collect, harvest;" Gothic lisan "to collect, harvest," Lithuanian lesti "to pick, eat picking;" Hittite less-zi "to pick, gather."