"Knocking' On Heaven's Door" was written for the soundtrack of the 1973 film Pat Garrett & Billy the Kid.
Rudy Wurlitzer, the film's screenwriter, told the story of how the song was written: "Bob wrote the film score in Mexico City, but before that, one night when we were returning to Durango from Mexico City — I forget why we were there – he said he wanted to write something for Slim Pickens' death scene, which was due to be shot the next day. He scrawled something on the airplane and showed it to me line by line, and when we got off the plane, there it was, "Knockin' On Heaven's Door."
Wurlitzer also helped Dylan get his role: "When Dylan heard that a Billy the Kid film was in the works, he came to see me wanting to know if there was any way he could be a part of it. He said he was Billy the Kid in a past life. After I wrote a part for him, we flew to Durango so that he could meet Sam Peckinpah (the director). We walked up to his house after dinner, where Sam was drinking alone in his bedroom and staring at himself in a full-length mirror. He turned to Dylan and said, "I'm a big Roger Miller fan myself. Not much use for your stuff."
After Dylan performed "Billy" for Peckinpah, he was offered the role of a character named Alias, a quiet stranger who liked to play with a knife. In November 1972, Bob moved his family to the filming location, Durango, Mexico.
The film's production was plagued with problems: too many stars, not enough money, too many reshoots, not enough time scheduled, not enough money, malfunctioning cameras, influenza, alcoholism, not enough time to edit, irritated directors, and financial backers. Most of the actors in the film, along with the production crew, passed through Hell's Door rather than Heaven's.
During the 1973 studio sessions, Dylan recorded a short chorus for a song called "Rock Me Mama" that was not included on the soundtrack. However, it did end up on a bootleg recording which Ketch Secor of the Nashville band Old Crow Medicine Show discovered some 25 years later. Secor took it upon himself to write a complete lyric and record the song as "Wagon Wheel" in 2003. Darius Rucker covered it in 2013. Both of which became Chart Hits, and played so often the song is banned in some establishments.
When first released the movie was a box-office failure. Critics and the Hollywood elite panned the movie but eventually became a cult classic after it was re-released on Laserdisc in 1988 and again in 2005 on DVD. Empire magazine ranked it 126 on their list of The 500 Greatest Movies of All Time. Dylan's soundtrack was nominated for a Best Original Score Grammy. Bob was not nominated for his part as Alias.
Two months after the film's premiere, "Knocking' On Heaven's Door" was released as a single and became a Top 10 hit in several countries. It became one of Dylan's most popular and most covered compositions. Over 500 artists have performed it over 5000 times. Bob has performed it some 460 times, according to bobdylan.com.
What was HE thinking? (With regards to the illustration), — Perhaps, with all the time spent in the hot, dry Mexican desert sitting around waiting for scenes to be reshot, MAYBE he was thinking 50 years into the future, having visions about shots of Heaven's Door Straight Bourbon Tennessee Whiskey and a Pleasureville, Kentucky distillery instead of guns and bullets.
Sounds like Heaven to me.