According to John Markoff in his 2005 book What the Dormouse Said: How the Sixties Counterculture Shaped the Personal Computer Industry, the first online ecommerce transaction was a drug deal:
In 1971 or 1972, Stanford students using Arpanet accounts at Stanford University's Artificial Intelligence Laboratory engaged in a commercial transaction with their counterparts at Massachusetts Institute of Technology. Before Amazon, before eBay, the seminal act of e-commerce was a drug deal. The students used the network to quietly arrange the sale of an undetermined amount of marijuana.
Mike Power of The Guardian has more: Link