1812, "bar for drawing or measuring straight lines," from straight (adj.1) + edge (n.). As the name of a punk subculture, attested by 1987, probably suggested by straight (adj.2).
Entries linking to straight-edge
straight adj.1
late 14c., "direct, undeviating; not crooked, not bent or curved," of a person, "direct, honest;" properly "stretched," adjectival use of Old English streht (earlier streaht), past participle of streccan "to stretch" (see stretch (v.)). Related: Straightly; straightness.
Meaning "true, direct, honest" is from 1520s. Of communication, "clear, unambiguous," from 1862. Sense of "undiluted, uncompromising" (as in straight whiskey, 1874) is American English, first recorded 1856. As an adverb from c. 1300, "in a straight line, without swerving or deviating." Theatrical sense of "serious" (as opposed to popular or comic) is attested from 1895; vaudeville slang straight man first attested 1923.
Go straight in the underworld slang sense is from 1919; straighten up "become respectable" is from 1907. To play it straight is from 1906 in theater, 1907 in sports ("play fair"), with figurative extension; later perhaps also from jazz. Straight arrow "decent, conventional person" is 1969, from archetypal Native American brave name. Straight shooter is from 1928. Straight As "top grades" is from 1920.
edge n.
Old English ecg "corner, edge, point," also "sword" (also found in ecgplega, literally "edge play," ecghete, literally "edge hate," both used poetically for "battle"), from Proto-Germanic *agjo (source also of Old Frisian egg "edge;" Old Saxon eggia "point, edge;" Middle Dutch egghe, Dutch eg; Old Norse egg, see egg (v.); Old High German ecka, German Eck "corner"), from PIE root *ak- "be sharp, rise (out) to a point, pierce."
Spelling development of Old English -cg to Middle English -gg to Modern English -dge represents a widespread shift in pronunciation. To get the edge on (someone) is U.S. colloquial, first recorded 1911. Edge city is from Joel Garreau's 1992 book of that name. Razor's edge as a perilous narrow path translates Greek epi xyrou akmes. To be on edge "excited or irritable" is from 1872; to have (one's) teeth on edge is from late 14c., though "It is not quite clear what is the precise notion originally expressed in this phrase" [OED].
straight adj.2
"conventional," especially "heterosexual," 1941, a secondary sense evolved from straight (adj.1), probably suggested by straight and narrow path "course of conventional morality and law-abiding behavior," which is based on a misreading of Matthew vii.14 (where the gate is actually strait), and the other influence seems to be from strait-laced.