The story
Unknown. Attested since 1951 as US student slang. * Perhaps an alteration of nerts (“nuts", "crazy”); see references below. * The word, capitalized, appeared in 1950 in Dr. Seuss’s If I Ran the Zoo as the name of an imaginary animal: *: And then, just to show them, I’ll sail to Katroo / And bring back an It-Kutch, a Preep and a Proo, / A Nerkle, a Nerd and a Seersucker too! * Possibly a rebracketing of inert as a nert, as in he's inert = he's a nerd, in reference to one's lack of competence or athletic ability. * Various unlikely folk etymologies and less likely backronymic speculations also exist.
Etymology from Wiktionary, CC BY-SA 4.0.