masc. proper name, from Latin Iustinus, literally "just," from iustus (see just (adj.)) + common name-forming element -inus (see -ine (1)). The Justinian Code was a compilation made by Justinian, emperor of the East, in 529.
late 14c., "morally upright, righteous in the eyes of God" ("Now chiefly as a Biblical archaism" - OED); also "equitable, fair, impartial in one's dealings;" also "fitting, proper, conforming to standards or rules;" also "justifiable, reasonable;" from Old French juste "just, righteous; sincere" (12c.) and directly from Latin iustus "upright, righteous, equitable; in accordance with law, lawful; true, proper; perfect, complete" (source also of Spanish and Portuguese justo, Italian giusto), from ius "a right," especially "legal right, law" (see jurist; from Latin ius also come English jury (n.), injury, etc.).
From c. 1400 as "right-minded, good in intention;" from early 15c. as "legal, lawful, right in law." Also "exact, precise; marked or characterized by precision; having correct dimensions" (late 14c.); of narrations, calculations, etc., "accurate, correct" (early 15c.). The sense in music, "harmonically pure, correct, and exact" is by 1850.
The more mundane Latin law-word lex covered specific laws as opposed to the body of laws. The noun meaning "righteous person or persons; Christ" is from late 14c. (The neuter adjective in Latin was used as a noun, iustum, "what is right or just").
also -in, adjectival word-forming element, Middle English, from Old French -in/-ine, or directly from Latin suffix -inus/-ina/-inum "of, like," forming adjectives and derived nouns, as in divinus, feminus, caninus; from PIE adjectival suffix *-no- (see -en (2)).
The Latin suffix is cognate with Greek -inos/-ine/-inon, and in some modern scientific words the element is from Greek. Added to names, it meant "of or pertaining to, of the nature of" (Florentinus), and so it also was commonly used in forming Roman proper names, originally appellatives (Augustinus, Constantinus, Justinus, etc.) and its descendants in Romanic languages continued active in name-forming. The Latin fem. form, -ina, was used in forming abstracts (doctrina, medicina). Relics of the attempt to continue a distinction between Latin -ina and -inus account for the English hesitation in spelling between -in and -ine.