The song was written for Ken Prymus, the actor playing Private Seidman, to sing during the faux-suicide of Walter "Painless Pole" Waldowski (John Schuck) in the film's "Last Supper" scene. Director Robert Altman had two stipulations about the song for composer Johnny Mandel: it had to be called "Suicide Is Painless" and it had to be the "stupidest song ever written".
Altman attempted to write the lyric himself, but, upon finding it too difficult for his "45-year-old brain" to write something "stupid" enough, he gave the task to his 15-year-old-son Michael, who reportedly wrote the lyrics in five minutes.
Altman later decided that the song worked so well he would use it as the film's main theme. This more choral version was sung by uncredited session singers John Bahler, Tom Bahler, Ron Hicklin, and Ian Freebairn-Smith, and was released as a single attributed to "The Mash".
Altman said that, while he only made $70,000 for directing the movie, his son had earned more than $1 million for co-writing the song.