The song was written in October 1968, intended for the album The Beatles, but missed off due to time constraints. It was rehearsed again three months later, in January 1969, at Twickenham film studios during the Get Back sessions but would not be recorded for another six months.
Beatles guitarist George Harrison described the song in 1969 as "one of those instant whistle-along tunes which some people hate, and other people really like. It's a fun song, but it's kind of a drag because Maxwell keeps on destroying everyone like his girlfriend then the school teacher, and then, finally, the judge." Lennon derided it as "more of Paul's granny music". In 1994, McCartney said that the song merely epitomises the downfalls of life, being "my analogy for when something goes wrong out of the blue, as it so often does, as I was beginning to find out at that time in my life. I wanted something symbolic of that, so to me it was some fictitious character called Maxwell with a silver hammer. I don't know why it was silver, it just sounded better than Maxwell's hammer. It was needed for scanning. We still use that expression now when something unexpected happens
