Dylan, of course, wrote the song, although there is an urban legend purporting that a high school junior named Lorre Wyatt actually wrote the song and sold it to Dylan, or Dylan stole it, depending on which version of the legend you hear. Wyatt told his teacher that he sold the song for $1,000, and Newsweek magazine even picked his story up in 1963. Eleven years later, Wyatt fessed up.
Dylan debuted the song at Gerdes Folk City in 1962. In fact, at that performance, Dylan introduced the song saying it wasn't written as a protest song. The tune wasn't yet finished, and only consisted of two verses. The third verse was composed after that performance.
He recorded it in July of that same year (only three months later) for his album The Freewheelin' Bob Dylan.