As far as the Internet is concerned, the term is rumored to have originated from the MUD/MUSH community. Nathan J. Mehl, newsadmin for BBN Planet, tells the most reliable story known to date...
My friend-who-shall-remain-nameless was, ah, a younger and callower man, circa 1985 or so, and happened onto one of the original Pern MUSHes during their most Sacred Event -- a hatching. After trying to converse sanely with two or three of the denizens, he came quickly to the conclusion that they area all of bunch of obsessive-compulsive nitwits with no life and less literary taste. (Probably true.) So, as the 'eggs' were 'hatching', he assigned a keyboard macro to echo the line: SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM ...and proceeded to invoke it once every couple of seconds, until one of the wizards finally booted him off. ...which would have probably been that last that anyone ever heard or thought of it, except that it apparently ingrained itself into the memory of the PernMUSHers, and forever after there was the legend of 'that asshole who spammed us.' Every once in a while, this story makes it back to my friend, and he tries very hard to keep a straight face...
More recently, in April 1994, Laurence Canter and Martha Siegel, two lawyers with unsavoury backgrounds, posted several thousand copies of an advertisement for their services to Usenet in the space of a few hours, triggering disk overflows, network downtime, and in some cases, system crashes. As a result of this massive dump of duplicates into the Usenet discussions, New Zealand's Internet services were knocked completely out of commission. And due to this wanton destruction, spam suddenly became a hot issue.