The first documented use of the word Nerd is in 1950 in the Dr. Seuss story, If I Ran the Zoo. One blogger who goes by the name Bron has used his engineering brain to track the origin of the word "nerd" and he points out its first use was by Dr. Seuss. "A boy named Gerald McGrew made a large number of delightfully extravagant claims as to what he would do, if he were in charge at the zoo. Among these was that he would bring a creature known as a Nerd from the land of Ka-Troo." So a nerd (per the illustrator) equaled this grumpy character pictured below (oh the power of illustrators).
After Dr. Seuss, Newsweek used the word in an October 1951 issue to mean a person who is "a drip or a scurve." The St. Joseph, Michigan, Herald-Press used the word again in June 1952, again with a negative connotation. For deeper study (and argument) into the origin of the word, visit the nerd expert's blog