Nile Rodgers has told how a bad gig made him kick his drink and drugs habit. The revered music producer – who has worked with the likes of David Bowie, Mick Jagger and Diana Ross – rose to prominence as a member of the band Chic in the 1970s.

The 66-year-old appeared on Desert Island Discs and said he decided to go sober after listening back to a performance he had given while drunk. Rodgers told host Lauren Laverne he had been in Miami, Florida, working with a Cuban musician and was invited to a party by Madonna.

Before attending the party he performed what he thought had been a great gig while under the influence – only to later learn the truth.

He said: “I was the last person to leave Mo’s house, they carried me out. The look on my face [when he heard the music from the night before], I was so embarrassed. I now really feel officially crazy because my brain said I was amazing.

“My performance said I was pretty lousy. The difference between the reality and the imagined reality was just too strong for me to take. And I knew that the only thing responsible for that was me doing drugs.

“My drugs made me think it was amazing. The people freaking out made me think it was amazing. My beautiful date made me think it was amazing. But the tapes don’t lie. It was not amazing. And that’s the last time I ever had a drink or drugs and it was 24 years.”

His song choices on the BBC show included Bowie, Sister Sledge and Jimi Hendrix. Rodgers, a Rock & Roll Hall of Fame inductee and multiple Grammy winner, also discussed growing up in New York City with drug addict parents and he revealed he twice saved his father’s life.

Desert Island Discs airs on Radio 4 on Sunday at 11.15am.