Ok, imagine this. You're Paul McCartney, and it's January 19th, 1967. You've just finished laying down the basic track for your next album's grand finale, called "A Day In The Life". Unbeknownst (?) to you, this song was borne out of your childhood boy-best-friend/writing partner's starkly gleeful reaction to the news of your new friend's violent death just a month prior. There's reason to believe your partner was quite jealous/resentful of this newfound friendship. Not only have you dropped acid with your friend when you've been refusing to share that same experience with your partner, but the previous year you had your friend over for Christmas with the family up in Liverpool, after which you proceeded to break your face in a moped crash during a joint moonlit ride. Your friend's subsequent death in a car crash might have come to inform your partner's concept of Instant Karma.
You're Paul McCartney, and it's January 24th, 1967. You're having dinner with this playwright you like. You claim his is the only play you've managed to sit through without getting a 'sore arse'. You like the play so much you've invested £1,000 in it. It's about this bisexual catholic boy whose mother just died (Hal), his childhood boy-best-friend/partner in crime, and the robbery they're in the process of committing. There's reason to believe you might have identified with this Hal character. Incidentally, this character seems to be named after the playwright's partner of 16 years, Halliwell.
You're Paul McCartney, and it's August 9th, 1967. The news breaks out that the previous night, the playwright has been bludgeoned to death by his partner, in a fit of rage and jealously, with 9 hammer blows to the head. The partner has then immediately committed suicide by overdosing on pills. The song that plays at the playwrights funeral, 9 days later, is his favorite record, "A Day In The Life". Unbeknownst to you, your friend and manager will die from a pill overdose in 9 days.
You're Paul McCartney, and it's the summer of 1968. Life as you knew it is falling apart. Your partner is now, out of the blue, seemingly in love with this new woman. Not only did you have to deal with them briefly living at your house, where just the year before you blissfully cohabitated with your partner, but he has also broken the sanctity of your creative space by bringing her into the studio and all writing sessions. At some point, you bring to the recording sessions a song about this guy named HalliMaxwell, who goes around bludgeoning people to death with his silver hammer. Incidentally, his first victim seems to be named after your partner of 11 years. You don't end up actually recording the track until a year later, during which you infamously psychologically torture your other two bandmates with it for three whole days. The way you speak about it, this song appears to echo your own concept of Instant Karma:
Maxwell’s Silver Hammer was 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. [...] We still use that expression even now when something unexpected happens.
— Paul McCartney in Barry Miles' Many Years From Now (1997).
Some of my songs are based on personal experience, but my style is to veil it. A lot of them are made up, like ‘Maxwell’s Silver Hammer’ which is the kind of song I like to write. It’s just a silly story about all these people, I’d never met. It’s just like writing a play: you don’t have to know the people, you just make them up. I remember George once saying to me, ‘I couldn’t write songs like that.’ He writes more from personal experience. John’s style was to show the naked truth. If I was a painter, I’d probably mask things a little bit more than some people. The song epitomizes the downfalls of life. Just when everything is going smoothly – Bang! Bang! – Down comes Maxwell’s silver hammer and ruins everything.
— Paul McCartney in The Beatles Anthology (2000).
Maxwell's Silver Hammer (1969): Bang! Bang! Maxwell's silver hammer / Came down upon her head. / Bang! Bang! Maxwell's silver hammer / Made sure that she was dead.
Instant Karma! (1970): Instant karma's gonna get you / Going to knock you on the head / You gonna break your body, darling / Pretty soon you're going to be dead