Dylan arrived at the Nashville Skyline recording sessions having written just four songs, including "I Threw It All Away" and "Lay Lady Lay". Having recorded these and three other new songs on February 13 and 14, 1969, he needed a few more songs to fill out the album. "Tonight I'll Be Staying Here with You" was written over two days at the Ramada Inn where Dylan was staying, and recorded over 11 takes on February 17. The song is reminiscent of the last two songs from Dylan's previous album John Wesley Harding, "Down Along the Cove" and "I'll Be Your Baby Tonight", particularly the latter.
The lyrics of "Tonight I'll Be Staying Here with You" mark a change from many of Dylan's earlier love songs, which expressed a restlessness in search of perfect love. In contrast, "Tonight I'll Be Staying Here with You" expresses Dylan's devotion to his lover and willingness to stay with her. Even though the line from the title, which is repeated at the end of each verse, only explicitly expresses a willingness to stay "tonight", the implication of the song is that the singer is willing to stay permanently and become a family man. Train imagery runs throughout the song, but unlike earlier songs that used similar imagery, in this song even though the singer "can hear that whistle blowin'" he wants to "throw [his] ticket out the window" and let "a poor boy on the street" have his seat so that he can stay with his lover. The accompaniment includes piano, pedal steel guitar and bass guitar.