The song was written by Dury and Jankel in Dury's flat in Oval Mansions, London (nicknamed "Catshit mansions" by Dury) that overlooked The Oval cricket-ground.
Dury typically presented Jankel with his hand-typed lyric sheets.
According to Chas in Sex And Drugs And Rock And Roll: The Life of Ian Dury, he would be repeatedly given the lyric for "Sex And Drugs And Rock And Roll" but kept rejecting the song only for it to be at the top of the pile in the next batch of songs, only to be rejected again.
This went on until Dury sang the song's title in time with the intended guitar riff.
Sometime later Jankel heard "Ramblin", a tune by Ornette Coleman (from the album Change of the Century, which also featured Charlie Haden and Don Cherry), and heard exactly the same bass riff being played by Haden.

Dury once apologised to Coleman for lifting the riff but, as Coleman explained, he (or possibly Haden) had lifted it himself from a Kentucky folk tune called "Old Joe Clark".
An alternative version to this story exists: as Dury explained when he guested on BBC Radio 4's Desert Island Discs, he had apologised to Haden at Ronnie Scott's Club for the riff lift, who responded by saying there was no need for an apology as he himself had lifted it from an old Cajun tune.

The single did not chart, selling only around 19,000 copies (a small number for a single in 1977) but won critical acclaim.
One factor of the poor sales performance may have been Stiff Records' singles deletion policy designed to promote initial sales and as such, chart success - the single was deleted after only two months.

Released, as it was, at the height of the popularity of punk rock, the song was misinterpreted (and often is to this day) as a song about excess, as its title and chorus might suggest.
Although the single was banned by the BBC, a number of Radio 1 disc jockeys, including Annie Nightingale and John Peel, continued to promote the record by playing the mildly salacious B-side "Razzle In My Pocket".
Dury himself maintained, however, that the song was not a punk anthem and said he was trying to suggest that there was more to life than a 9-to-5 existence (as in, for example, his track-by-track comments for the sleeve-notes of Repertoire Records' Reasons To Be Cheerful: The Best Of Ian Dury & The Blockheads compilation).
The verse lyrics are at times somewhat inscrutable, although always suggestive of an alternative lifestyle:
Here's a little bit of advice, you're quite welcome, it is free
Don’t do nothing that is cut-price, you'll know what they'll make you be

They will try their tricky device, trap you with the ordinary

Get your teeth into a small slice, the cake of liberty
— from "Sex & Drugs & Rock & Roll"
The title of the song became part of the English language and was later used in many other song lyrics.
The song was written by Dury and Jankel in Dury's flat in Oval Mansions, London (nicknamed "Catshit mansions" by Dury) that overlooked The Oval cricket-ground. Dury typically presented Jankel with his hand-typed lyric sheets. According to Chas in Sex And Drugs And Rock And Roll: The Life of Ian Dury, he would be repeatedly given the lyric for "Sex And Drugs And Rock And Roll" but kept rejecting the song only for it to be at the top of the pile in the next batch of songs, only to be rejected again. This went on until Dury sang the song's title in time with the intended guitar riff. Sometime later Jankel heard "Ramblin", a tune by Ornette Coleman (from the album Change of the Century, which also featured Charlie Haden and Don Cherry), and heard exactly the same bass riff being played by Haden.
Dury once apologised to Coleman for lifting the riff but, as Coleman explained, he (or possibly Haden) had lifted it himself from a Kentucky folk tune called "Old Joe Clark". An alternative version to this story exists: as Dury explained when he guested on BBC Radio 4's Desert Island Discs, he had apologised to Haden at Ronnie Scott's Club for the riff lift, who responded by saying there was no need for an apology as he himself had lifted it from an old Cajun tune.
The single did not chart, selling only around 19,000 copies (a small number for a single in 1977) but won critical acclaim. One factor of the poor sales performance may have been Stiff Records' singles deletion policy designed to promote initial sales and as such, chart success - the single was deleted after only two months.
Released, as it was, at the height of the popularity of punk rock, the song was misinterpreted (and often is to this day) as a song about excess, as its title and chorus might suggest. Although the single was banned by the BBC, a number of Radio 1 disc jockeys, including Annie Nightingale and John Peel, continued to promote the record by playing the mildly salacious B-side "Razzle In My Pocket". Dury himself maintained, however, that the song was not a punk anthem and said he was trying to suggest that there was more to life than a 9-to-5 existence (as in, for example, his track-by-track comments for the sleeve-notes of Repertoire Records' Reasons To Be Cheerful: The Best Of Ian Dury & The Blockheads compilation). The verse lyrics are at times somewhat inscrutable, although always suggestive of an alternative lifestyle:
Here's a little bit of advice, you're quite welcome, it is free
Don’t do nothing that is cut-price, you'll know what they'll make you be

They will try their tricky device, trap you with the ordinary

Get your teeth into a small slice, the cake of liberty
— from "Sex & Drugs & Rock & Roll"
The title of the song became part of the English language and was later used in many other song lyrics.
The Blockheads