Background and release
In 2004, after the release of her ninth studio album American Life, Madonna began working on two different musicals: one tentatively called Hello Suckers and another one with Luc Besson, who previously directed the music video for her single "Love Profusion", which would portray her as a woman on her deathbed looking back on her life. Madonna collaborated with Patrick Leonard, Mirwais Ahmadzaï and Stuart Price to write new songs, and told Price to pen disco songs that sound like "ABBA on drugs". However, Madonna found herself dissatisfied with the script written by Besson and scrapped it. When she began composing Confessions on a Dance Floor, she decided to rework "Hung Up" and include it in her record.
"Hung Up" was one of the first songs written for the album, along with "Sorry" and "Future Lovers". It was inspired by aspects of the 1970s disco era, including the music of ABBA and Giorgio Moroder and the film Saturday Night Fever (1977). Madonna imagined it to be a cross between the music played at Danceteria, the New York City night club she frequented in her early days, and the music of ABBA. Their 1979 hit "Gimme! Gimme! Gimme! (A Man After Midnight)" formed the basis of the song. Songwriters Benny Andersson and Björn Ulvaeus generally do not allow anyone to sample any of their tracks, an exception being Fugees, who sampled their song "The Name of the Game" for their single "Rumble in the Jungle". In order to gain the rights to sample "Gimme! Gimme! Gimme!", Madonna had to send her emissary to Stockholm with a letter which begged them to allow her to sample the song and also telling how much she loved their music. To the BBC she explained: "[T]hey never let anyone sample their music. Thank God they didn't say no. [...] They had to think about it, Benny and Björn. They didn't say yes straight away." The pair agreed to let Madonna use the sample only after making a copyright agreement that entitled them to a significant share of the royalties from subsequent sales and airplay. Andersson, in an interview with The Daily Telegraph in October 2005, declared "Gimme! Gimme! Gimme!" to be the essence of "Hung Up" while joking that it was his favourite Madonna song thus far. He further said:
"We get so many requests from people wanting to use our tracks but we normally say 'no'. This is only the second time we have given permission. We said 'yes' this time because we admire Madonna so much and always have done. She has got guts and has been around for 21 years. That is not bad going."
The song premiered in September 2005, during a television advertisement for Motorola's iTunes compatible ROKR mobile phone. The advertisement featured Madonna and other artists jammed in a phone booth. On October 17, 2005, the song made its premiere during a live ten-minute radio interview between Ryan Seacrest and Madonna. It was also made available as a master ringtone with various mobile service providers. "Hung Up" was sent to mainstream radio in the United States on October 18. The song was added to episodes of CSI: Miami and CSI: NY on November 7 and 9, 2005, respectively. While promoting Confessions on a Dance Floor, Madonna played both "Hung Up" and the next single "Sorry" at Luke & Leroy's nightclub in Greenwich Village, where she was invited by Junior Sanchez to perform briefly as the DJ, mixing the two songs. Regarding her decision to release the song to iTunes, Madonna said: "I'm a businesswoman. The music industry has changed. There's a lot of competition, and the market is glutted with new releases – and new 'thises and thats'. You must join forces with other brands and corporations. You're an idiot if you don't."