"Kid Charlemagne" was written by Walter Becker and Donald Fagen, who are credited as composers and lyricists. Steely Dan recorded it in May 1976 with Gary Katz as producer, and it opens the album The Royal Scam (ABC Records, 1976), with Fagen on lead vocals. The lyrics are loosely inspired by the rise and fall of San Francisco LSD chemist Owsley Stanley; the final verse describes his 1967 arrest after his car reportedly ran out of gas. An edited version released as a single in June 1976, with "Green Earrings" on the B-side, reached number 82 on the Billboard Hot 100. The album version runs 4:38.
The track is usually described as jazz fusion and funk rock. Larry Carlton's guitar solo, a composite of two takes, is widely praised: Rolling Stone ranked it number 80 in its 2008 list of the 100 greatest guitar solos and number 8 in its 2026 update. Personnel include Don Grolnick, Paul Griffin, Chuck Rainey and Bernard Purdie. Kanye West sampled the song on "Champion" from Graduation (2007), a sample Becker and Fagen had refused to license. Covers include versions by The Woody Herman Band (1978) and Larry Carlton with SWR Big Band.