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.
The song contains a break in the line "Robbing people with a six gun", where the rhythm continues in regular time signature but plays two triplets (i.e., 6 beats in succession), in order to represent six shots of the "six gun" revolver in the song. This rhythmic device is found in the Crickets, Clash, and Bobby Fuller Four versions of the song.
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.
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 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 gangster, sang alongside Scottish pop-punks Mute, fronted by Jay Burnett, who wrote an updated version with lyrics based on Dave's legendary court case. Both this and the Dead Kennedys' version are titled "I Fought the Law and I Won".
In 1999, Mike Ness of Social Distortion covered the tune on his second solo effort, Under the Influences, which peaked at No. 174 on the Billboard 200 (November 27, 1999).
^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.Cite uses deprecated parameters (help)
^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."