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].