The recording sessions took place in February 1973, Wexler provided Nelson and his band with a studio in New York City, where most of the recordings were produced. Doug Sahm and his band were also invited to the sessions. During the first session, Nelson recorded the songs for "The Troublemaker". Later, he proceeded with "Shotgun Willie". Wexler had encouraged Nelson after singing the gospel album to start with the new one, to couple old material with new, and covers. He initially recorded twenty-three tracks along with his and Sahm's band, but Nelson still was not inspired. He wrote the title song after one of the sessions. Pacing in his hotel room, he went to the bathroom, where he sat on the toilet and took the empty envelope from a sanitary napkin from the sink, and penned the song on that. The title of the song refers to the nickname Nelson received after his daughter, Susie, warned him of the domestic abuse suffered by her sister Lana. Nelson drove to Lana's house, where he fought with her husband Steve Warren, and threatened to kill him if he repeated the assault. Soon after Nelson returned home, Warren arrived in his truck with his brothers. The men shot at the house with .22 caliber rifles. In response, Nelson and Paul English shot at the aggressors that retreated. When they returned later, Nelson took English's M1 Garand and shot the truck, causing them to surrender. He completed the rest of the song with a reference to John T. Floore, owner of the honky-tonk Floore's Country Store. After hearing the completed song, Wexler decided that the album was to be named after it. Nelson later recalled, "Kris Kristofferson told me later the song 'Shotgun Willie' was 'mind farts.' Maybe so, but I thought of it more as clearing my throat."