Forty years ago this December, Aerosmith's lead guitarist Joe Perry and singer Steven Tyler began collaborating on a song that would become a top-10 hit twice—establishing the band's national identity in the '70s and helping to erase the cultural divide between rock and rap in the '80s.

"Walk This Way" didn't make the charts when it was released in 1975, but after the single was reissued in 1976 in the wake of Aerosmith's successful "Rocks" album, it climbed to No. 10 on Billboard's pop chart. Ten years later, when Messrs. Tyler and Perry teamed with rap group Run-D.M.C. for a cover version and video of "Walk This Way," the remake reached No. 4 and was inducted into the Grammy Hall of Fame this year.

Mr. Perry, 64, whose memoir "Rocks: My Life in and Out of Aerosmith" is due out Oct. 7, and Mr. Tyler, 66, recently talked about the song's origins. Excerpts from the interviews:

Joe Perry: When Aerosmith played its first gig in November 1970, we were heavily into funk and soul. Joey Kramer, our drummer, had been putting himself through Boston's Berklee College of Music playing in an R&B band at seedy clubs in the city's "Combat Zone." He knew all the Motown stuff, while the rest of us were into James Brown and Sly Stone. Guitarist Jeff Beck had turned me on to the Meters, and I loved their riffy New Orleans funk, especially "Cissy Strut" and "People Say."

In December of '74, we flew to Honolulu to open for the Guess Who. During the sound check, I was fooling around with riffs and thinking about the Meters. I asked Joey to lay down something flat with a groove on the drums. The guitar riff to what would become "Walk This Way" just came off my hands.