The lyrics

'Walrus' is just saying a dream - the words don't mean a lot. People draw so many conclusions and it's ridiculous... What does it really mean, 'I am the eggman'? It could have been the pudding basin for all I care. It's not that serious.
John Lennon
Download on iTunes

The song's title came from Lewis Carroll's poem The Walrus And The Carpenter, from the book Through The Looking Glass. Lennon later realised with dismay that he'd identified with the villain of the piece.

It never dawned on me that Lewis Carroll was commenting on the capitalist system. I never went into that bit about what he really meant, like people are doing with the Beatles' work. Later, I went back and looked at it and realised that the walrus was the bad guy in the story and the carpenter was the good guy. I thought, Oh, shit, I picked the wrong guy. I should have said, 'I am the carpenter.' But that wouldn't have been the same, would it?
John Lennon, 1980
All We Are Saying, David Sheff

The eggman of the chorus, while possibly a reference to Carroll's Humpty Dumpty, was more likely The Animals' lead singer Eric Burdon following a particularly notable incident recounted to Lennon at a London party.

It may have been one of my more dubious distinctions, but I was the Eggman - or, as some of my pals called me, 'Eggs'.

The nickname stuck after a wild experience I'd had at the time with a Jamaican girlfriend called Sylvia. I was up early one morning cooking breakfast, naked except for my socks, and she slid up beside me and slipped an amyl nitrate capsule under my nose. As the fumes set my brain alight and I slid to the kitchen floor, she reached to the counter and grabbed an egg, which she cracked into the pit of my belly. The white and yellow of the egg ran down my naked front and Sylvia slipped my egg-bathed cock into her mouth and began to show me one Jamaican trick after another. I shared the story with John at a party at a Mayfair flat one night with a handful of blondes and a little Asian girl.

'Go on, go get it, Eggman,' Lennon laughed over the little round glasses perched on the end of his hook-like nose as we tried the all-too-willing girls on for size.

Don't Let Me Be Misunderstood
Eric Burdon with J Marshall Craig

I Am The Walrus contained words ("crabalocker", "texpert", the chorus refrain "goo goo g'joob") coined by Lennon. As such, it owed more to his books In His Own Write and A Spaniard In The Works than anything The Beatles had previously recorded.

You know, you just stick a few images together, thread them together, and you call it poetry. Well, maybe it is poetry. But I was just using the mind that wrote In His Own Write to write that song. There was even some live BBC radio on one track, y'know. They were reciting Shakespeare or something and I just fed whatever lines were on the radio into the song.
John Lennon
All We Are Saying, David Sheff

According to Lennon's childhood friend Pete Shotton, he was further inspired to turn the song into a nonsense tour-de-force after receiving a letter from Stephen Bayley, a pupil at his old primary school Quarry Bank. The letter revealed that a teacher was having his class analyse Beatles lyrics.

Lennon asked Shotton to remind him of a playground rhyme they'd known from childhood:

Yellow matter custard, green slop pie, all mixed together with a dead dog's eye. Slap it on a butty, ten foot thick. Then wash it all down with a cup of cold sick.

This became "Yellow matter custard, dripping from a dead dog's eye", followed by a stream of mostly meaningless nonsense. "Let the fuckers work that one out," was his response to Shotton when he'd finished.

'Semolina pilchard', according to Marianne Faithfull, was a reference to Detective Sergeant Norman Pilcher, the notoriously anti-drug zealot who made it his mission to bust people from the music world for possession of illegal substances. Elsewhere, the beat poet Allen Ginsberg made an oblique appearance:

I'd seen Allen Ginsberg and some other people who liked Dylan and Jesus go on about Hare Krishna. It was Ginsberg, in particular, I was referring to. The words 'Elementary penguin' meant that it's naive to just go around chanting Hare Krishna or putting all your faith in one idol.
John Lennon, 1980
All We Are Saying, David Sheff

The BBC banned the song for the lines "pornographic priestess" and "let your knickers down". As Hunter Davies recorded, the lines were particularly admired by George Harrison.

Why can't you have people fucking as well? It's going on everywhere in the world, all the time. So why can't you mention it? It's just a word, made up by people... It doesn't mean a thing, so why can't we use it in a song? We will eventually. We haven't started yet.
George Harrison
The Beatles, Hunter Davies