"The Moon Is a Harsh Mistress" (sometimes titled as "The Moon's a Harsh Mistress") is a song by American songwriter Jimmy Webb. It has become a much-recorded standard, without ever having charted as a single. Webb appropriated the title from the 1966 science fiction novel The Moon Is a Harsh Mistress by Robert A. Heinlein. The song is especially associated with Glen Campbell, who performed the song on his farewell tour,Judy Collins, and Joe Cocker, who first recorded the song in 1974.
The song is commonly presented in the key of G (to B♭). The song structure consists of three seven-line verses and a two-line coda. The first two verses have a rhyme scheme of AABACDC. The third verse modulates three half steps (from G to Bb), with the rhyme scheme altered to ABABCDC, and the coda repeating the DC. The time signature of the song is common time with the lines introduced between the second and third beat.
In a 2009 interview with Lisa Torem for Penny Black Music, Jimmy Webb talked about the influence of Robert Heinlein and the song's title:
Robert Heinlein, was a kind of early mentor of mine. I started reading his books when I was eight years old. ... I guess I was really getting more of my education out of science-fiction than out of public school. I was reading Ray Bradbury and Isaac Asimov and learning a great deal about the patois of the language itself and how these words were being used to create emotions. I was learning this from writers without even knowing it. ... "The Moon is a Harsh Mistress" was one of the best titles I've ever heard in my life. I really am guilty of appropriating something from another writer. In this case I had contact with Robert A. Heinlein's attornies. I said, 'I want to write a song with the title, "The Moon is a Harsh Mistress". Can you ask Mr. Heinlein if it's okay with him?' They called me back and he said he had no objection to it.
Since Joe Cocker's first recording of the song in 1974, "The Moon Is a Harsh Mistress" has been recorded by a variety of artists, from traditional renditions by female singers such as Judy Collins, Linda Ronstadt, and Joan Baez, to versions by male singers such as Joe Cocker, Glen Campbell, and Michael Feinstein. Webb recorded the song twice, in 1977 for his El Mirage album, and again in 1996 for his Ten Easy Pieces album. The song has attracted a wide range of artists, including the Norwegian singer Radka Toneff, who recorded the song on her 1982 album Fairytales, which in a 2011 poll of Norwegian musicians was voted the best Norwegian album ever. Various instrumental versions have also been recorded, including the 1997 version by Charlie Haden and Pat Metheny on the album Beyond the Missouri Sky (Short Stories), which won a Grammy for Best Jazz Instrumental Album, Individual or Group.