The song was written in 1958 by Sonny Curtis, and recorded in 1959 when he joined the Crickets, taking the place of the late Buddy Holly on guitar. Joe B. Mauldin and Jerry Allison continued their positions on the standup bass and drums, respectively, while Earl Sinks filled the role for vocals. The song was on their 1960 LP, In Style with the Crickets, and the following year appeared as the b-side of their single, "A Sweet Love". The song never received any airplay. Milwaukee's Paul Stefen and the Royal Lancers covered the song in 1962; it provided them with a local hit, but it never made the national charts. In 1964, Sammy Masters recorded his cover of the song. That same year, the song was recorded by Bobby Fuller and his band on his own Exeter label in El Paso, which solidified the band's popularity in the West Texas area with one of his biggest local hits.
After enjoying regional success in Texas, Bobby Fuller and band decided to switch to a major label—Del-Fi Records under Mustang Records—and they became known as the Bobby Fuller Four. While producing minor hits, the band broke the national top ten when they re-recorded "I Fought the Law" in 1965 with Bobby Fuller (vocals, guitar), Randy Fuller (backing vocals, bass guitar), Jim Reese (backing vocals, guitar), and DeWayne Quirico (drums).
In mid-1978, the Clash were working on their second album, Give 'Em Enough Rope. Singer Joe Strummer and guitarist Mick Jones flew out to San Francisco to record overdubs in September–October at the Automatt studio. The owner of The Automatt kept his collection of classic jukeboxes distributed around the various rooms of the studio complex. Strummer and Jones listened to the Bobby Fuller version of "I Fought the Law" for the first time on one of the jukeboxes, and by the time they returned to England they could perform the song.
Their version first appeared on the EPThe Cost of Living in May 1979 in the UK, and then later in 1979 was made part of the American edition of the Clash's eponymous album. This cover version helped gain the Clash their first taste of airplay in the States and is one of the best-known cover versions of the song. The live recording of the song, performed at the Lyceum Theatre, West End, London on December 28, 1978, features as the last piece of the 1980 film Rude Boy directed by Jack Hazan and David Mingay. The Clash were dressed all in black for that gig and the song, at that stage, was considered the film's title song.On July 26, 1979, "I Fought the Law" was the first single by the band to be released in the United States.
In 1989 during Operation Just Cause, the US military surrounded the Apostolic Nunciature in Panama while trying to capture Manuel Noriega, the strongman of Panama. US forces blasted loud rock music—including "I Fought the Law" by the Clash—to put pressure on Noriega to give himself up.
In 2012, the Clash's version of the song was featured in the video game Sleeping Dogs as part of a karaoke mini-game.
The song appears during the end credits of the 2014 film RoboCop.
The punk band Dead Kennedys put together their own version of "I Fought The Law" shortly after San Francisco politician Dan Whitemurdered city Supervisor Harvey Milk and Mayor George Moscone in 1978. Most of the lyrics were re-written so the song was from White's point of view, and the chorus was changed to "I fought the law, and I won". The song portrays White as someone who got away with first-degree premeditated murder and is unrepentant about it and specifically cites his use of the diminished responsibility defense. It also makes use of the reference "Twinkie defense", where lead singer Jello Biafra sings "Twinkies are the best friend I ever had".
Dave Courtney, the London "celebrity gangster," recorded a version Scottish pop-punks Mute. Mute's frontman Jay Burnett wrote new lyrics based on Courtney's famous court case. Like the Dead Kennedys' version, the chorus is changed to "I fought the law and I won".
^Green, Johnny; Barker, Garry (2003) . A Riot of Our Own: Night and Day with The Clash (3rd edition ed.). London: Orion. pp. 149–150. ISBN0-7528-5843-2. OCLC52990890.
^Salewicz, Chris (2007-05-15) . Redemption Song: The Ballad of Joe Strummer (1st American ed ed.). New York: Faber and Faber. p. 246. ISBN0-571-21178-X. OCLC76794852.
^Whistance, Don J. "Rude Boy". theclash.org.uk. Retrieved 2008-01-22. 10 I Fought the Law: The Lyceum, West End, London on the 28 December 1978 was where the last piece of filming took place which included Sonny Curtis's song: 'I Fought the Law'.
The Clash dressed all in black for the gig and played 'I Fought The Law ', which at that stage was being considered as the film's title song.