While working on his then-upcoming fourth studio album, Justin Bieber enlisted American DJ Skrillex to produce songs for the record after successfully working with him on "Where Are Ü Now", which was a song that he sent to Skrillex and Diplo for their project Jack Ü and that became a worldwide hit and helped to revamp his career. Regarding his will to work with the producer, Bieber commented: "Skrillex is a genius. He’s super futuristic and I just love his sounds. I think being able to incorporate that sound with what I’m doing has been super cool because it’s like new and fresh, and I feel like no one’s done it before." Skrillex, on other hand, commented about his involvement on the album, saying: "I heard some well-written songs that were really good that they wanted me to do production on and from there, we wrote some new songs. It was an opportunity to try some stuff that I had never done before and we ended up making something really unique." Skrillex also invited Michael Tucker, under his producer name BloodPop, to help him produce some tracks for the album. The producer wrote "Sorry" with other songwriters and immediately felt it was a relatable song. Later, he needed to convince Bieber's team that "Sorry" was "the song".
On October 18, 2015, Bieber announced the release of "Sorry", and a day later, the song was promoted through a Vine video that played the song in the background and featured King Bach and Michelle Obama. On October 21, 2015, Bieber posted an acoustic 13-second sample of the song, while on October 23, 2015, the song was officially released as Purpose second single. In the same day, Bieber posted a video on his Instagram, where he appeared in the studio with Blood and Skrillex, listening to the song and riding around on hoverboards. A "Latino remix" of the song, featuring Colombian singer J Balvin, was released worldwide on November 6, 2015.
"Sorry" is the result of a studio collaboration between Michael Tucker, under his producer moniker Blood, with songwriters Justin Tranter and Julia Michaels. Tucker was responsible for writing the music, while Tranter and Michaels contributed to the song's lyrics. Michaels and Tranter, who had already worked together in a handful of tracks and became songwriting partners, were asked to go write with Tucker in a session. Tucker created the song's melody with Bieber in mind, while Michaels was in a vocal booth with Tranter and the word "sorry" "popped out" of her head, as she recalled. After that, they came up with the lyrics, inspired by a personal event Michaels had, sent the demo to Bieber's team, and Bieber himself loved the track and "changed a couple things to make it feel more like him." Skrillex was responsible for the beat and claimed that he also acted as a support "for what Justin was saying and help[ed] keep it simple, and record good, memorable songs." Initially, Bieber thought the song was too safe and simple, but Skrillex told him it has a very refined simplicity about it.
Blood commented in an interview about the song, stating: "From the perspective of the producer, I find the muffled vocal chops to represent the people or situations in which Justin or the listener could be apologetic towards. The vocal manipulations make an ambiguous sound and a moment later Justin replies, 'Sorry.' I love that narrative. Justin's vocal delivery and the triumphant key of the song gave the narrative a warm color. I am most excited by music that allows the beat to tell a story as much as the vocal and in 'Sorry,' the beat is saying moving forward, and apologizing, can be exciting and fun." Bieber, on the other hand, opined that "the more [he] listened to it the more [he] fell in love with it." He continued: "The melodies are really catchy and some people would misinterpret that for being safe [...] but it's like The Beatles' 'Let It Be', simple melodies but it's so effective "music right now is missing those effective real songs."
In a January 2016 interview with GQ magazine, Bieber said the song was about a girl, and that girl is most likely his on-again-off-again girlfriend, Selena Gomez.
According to the sheet music published at Musicnotes.com by Universal Music Publishing Group, the song is composed in the key of E ♭ major with a moderately fast tempo of 100 beats per minute. Bieber's vocals range from the note of Eb4 to Bb5. "Sorry" is a dancehall-pop and tropical house song. It contains a "smooth but electrifying EDM beat, incorporating "brassy horn bleats", a reggaeton rhythm, warm island rhythms and a dembow riddim beat. It starts with a lone piano note before a distinct motif, most precisely a high-pitched coo, takes over. Bieber uses a smooth falsetto during the track. Bianca Gracie of Idolator drew parallels between "Sorry" and previous single "What Do You Mean?" for sharing "a similar tropical pop route" and found there were "a few more spritz of sweet, beachy and dancehall-inspired notes". Many critics also found sonic similarities between both songs.
Lyrically, the song is a plea "for a chance to apologize to an unidentified lover", with Bieber asking forgiveness, "saying that he misses 'more than just [her] body'" and "hoping they can 'both say the words and forget this.'" During the song, he sings: "I know you know that I made those mistakes maybe once or twice/ By once or twice I mean maybe a couple of hundred times. So let me, so let me redeem myself tonight/ Because I just need one more shot, a second chance." Andrew Unterbgerger of Spin noted that on the track, "Bieber's still a little too proud to beg; he undercuts the penitence of his verses by deflecting 'You know there are no innocents in this game for two,' and never actually delivering the titular apology, merely asking if doing so would still be productive."
Regarding its lyrics, Sheldon Pearce of Complex found it to be "sincere", while Amy Davidson of Digital Spy thought the opposite, considering it an unapologetic song. Meanwhile, Jamieson Cox of The Verge wondered, "Is he singing to an ex or to listeners around the world?" Julia Michaels, one of its songwriters, claimed that, "We were just trying to capture that moment in a relationship or a particular moment in your life where you realize you made a mistake and you're finally ready to admit it and apologize." Later, Bieber admitted that the song was not an apology for his past transgressions, explaining: "People ran with that—that I was like, apologizing with that song and stuff. It really had nothing to do with that. ... It was about a girl." Later, he confirmed that the girl in question was his ex-girlfriend Selena Gomez.
Leah Greenblatt of Entertainment Weekly cited the song for being "stripped down for maximum aerodynamics, the vocals mentholated and sweetened with a brushstroke of bass here, a snake-charmer synth line there." Andy Kellman of AllMusic selected the song as one of the album's highlights, citing the song and "What Do You Mean?" as tracks that "showed him making a deeper connection with his material and that, yes, he was progressing from performer to artist." Brad Nelson of Pitchfork also praised both songs for being "vivid tropical house tracks that sound like sunlight drifting down through palm fronds. Bieber's voice often resembles a breath contorted inexpressively through notes; here, he lets it weightlessly fall through textures. They are his best performances to date, allowing him to flex a rhythmic playfulness without communicating an iota of legible emotion." USA Today's Maeve McDermott wrote: "'Sorry' is just as much of an earworm as his previous single 'What Do You Mean?', with the same summery neon-hued electronic production." For Bianca Gracie of Idolator, the song "is a few notches above of its single predecessor" due to "the combination of dancehall flair and the continued trend of his 'come hither' laid-back vocals," considering it "one that has been unmatched this year."
Michelles Geslani of Consequence of Sound applauded the collaboration with Skrillex and BloodPop, saying "the results are beyond promising. It's a chill number marked by warm island rhythms." Brennan Carley of Spin wrote that the song "starts with a tropical drum-n-bass situation before exploding into a glorious, neatly wound chorus," calling it "a subdued step forward for the Biebs." Andrew Unterberger of the same publication noted: "Like any number of classic Motown songs, 'Sorry' understands that take-me-back songs are always more persuasive when they sound like fun you're missing out on, and the song's euphoric drop is a better second-chance argument than any the singer could present himself." Mikael Wood of the Los Angeles Times called it "airy tropical-house banger that makes the singer's first big hit, the puppyish 'Baby', seem like an artifact from a different era (which it pretty much is)."Time's Nolan Feeney also appreciated the song saying: "With a beat this breezy, though, that’s nothing to be sorry about." Dee Lockett of Vulture.com wrote: "it's a Caribbean-flavored house beat over which Bieber flexes his best falsetto." Sam C. Mac of Slant Magazine opined that the song brought "a mini-resurrection of the house/reggaeton fusion Moombahton, along with Bieber's most grown-n'-sexy lyrics." Amy Davidson of Digital Spy concluded: "With its show-offy vocal distortions and tropical feel, 'Sorry' might not be a sincere attempt at forgiveness—but that's probably why it sounds so good."
Billboard ranked "Sorry" at number 9 on its year-end list for 2015, writing: "Justin Bieber should try apologizing more often. From the bright opening notes to the manipulated vocal loop in the chorus, the Biebs brought EDM to his pop palette and made fans out of haters with an unforgivably good single."
In the United States, "Sorry" debuted at number two on the Billboard Hot 100 on the issue dated November 14, 2015 with 277,000 downloads sold and 23.1 million US streams in its first week, becoming Bieber's second consecutive top-10 debut (after "What Do You Mean?" which debuted at number one) and his eighth top-10 Billboard single overall. The song was blocked from the top by Adele's "Hello", which debuted at number one with 1.11 million downloads sold its first week on sale. With having debuted at number one and number two with prior single '"What Do You Mean?" and "Sorry", respectively, Bieber's Purpose became only the fourth album in Billboard's history to have yielded multiple songs that entered the Hot 100 in the top-two positions (the others were Mariah Carey's Daydream in 1995–96, Butterfly in 1997–98, and Eminem's Recovery in 2010). Additionally, with "Sorry" at number two and "What Do You Mean" at number five, Justin Bieber became the 20th solo male artist to have two songs inside the top five. The following week, the song sold 129,000 downloads, descending to number four on the Hot 100. However, it moved from 37 to 27 on the Radio Songs chart, with 46 million all-format audience impressions. In its fourth week, after the release of Purpose, the song ascended again to number two on the Hot 100, selling 82,000 copies. That week, Bieber's "What Do You Mean?" and "Love Yourself" (a track from Purpose, which debuted on the chart after selling 140,000 downloads) were at number five and four on the Hot 100, respectively, which made the singer be only the third artist to have three singles inside the chart's top five (the others being The Beatles in 1964 and 50 Cent in 2005). Additionally, the same week, Bieber had 17 songs on the Hot 100 simultaneously, breaking the record previously held by The Beatles and Drake.
For the chart dated December 12, 2015, after Bieber's performance on the American Music Awards, "Sorry" ascended from two to one on Digital Songs, selling 178,000 downloads and becoming Bieber's third chart-topper on thar chart, after 2012's "Boyfriend" and prior single "What Do You Mean?". For the chart dated January 2, 2016, the song became Bieber's first number-one single on the Streaming Songs chart, ascending from 2 to 1. That week, it also became his second number-one song on the Mainstream Top 40 chart. After eight non-consecutive weeks (seven consecutively) at number two, on the week charting 23 January 2016, "Sorry" dethroned Adele's "Hello" and became Bieber's second number-one single on the Billboard Hot 100, after selling 128,000 downloads and earning 145 million audience impressions. On the chart dated 6 February 2016, 'Sorry' stayed at the top of the Hot 100 for a third consecutive week, giving Bieber his longest number one on the chart. That week, Bieber's 'Love Yourself' ascended from 3 to 2, which made the singer be the 17th act in the Hot 100's history to rank at Nos. 1 and 2 simultaneously. He was just the 11th act to hold the Hot 100's top two as a lead artist on both songs. The following week, 'Sorry' became Bieber's first number-one song on the Radio Songs chart after earning 141 million audience impressions, however, it was beaten to the top on the Hot 100 by "Love Yourself". With that, Bieber became the 12th artist in the Hot 100's 57-year history to succeed himself at number one. On the issue dated 2 April 2016, "Sorry" spent its 21st week in the Hot 100's top ten, matching the mark for the most consecutive weeks logged in the Hot 100's top 10 from a song's debut. Impressively, Bieber's "What Do You Mean?" had already tied the record. The record was surpassed later by Bieber's own "Love Yourself", which spent 23 consecutive weeks in the top ten since its debut. As of February 2016, "Sorry" has sold 2 million copies in the U.S.
In the United Kingdom, the song entered at number two on the UK Singles Chart, once again behind Adele's "Hello", which debuted at number one on October 30, 2015. However, it climbed a place to the top of the UK Singles Chart on 20 November 2015, with 104,000 combined chart sales and 5.35 million streams, becoming Bieber's second chart-topping song in Britain. That week, Bieber had three songs inside the Official Singles Chart's top five, including "Sorry" (1), "Love Yourself" (3) and "What Do You Mean?" (5). No other male artist had achieved that in 34 years, since John Lennon did in January, 1981. In addition, the singer had eight songs inside the chart's top 40, the first time ever that a living act achieved this many entries simultaneously in the Official Singles Chart top 40 (the closest was Elvis Presley who managed a maximum of seven entries in 1957). The following week, 'Sorry' remained at number one, meanwhile 'Love Yourself' reached the number two position, making Bieber be the first act to dominate the two spots of the Official Singles Chart in 30 years, since Madonna did in 1985 with "Into the Groove" and "Holiday". The next week, "Sorry" was beaten to the top by Bieber's "Love Yourself", earning 5.5 and 5.97 million streams, respectively. With that, Bieber became the first act to replace themselves on the chart since Elvis Presley did in 2005. Also, he was the first living act to do so since The Beatles did in December 1963. "Sorry" and "Love Yourself" remained at the same place for two more consecutive weeks, making Bieber the first artist ever to log four weeks at numbers 1 and 2 consecutively, breaking the record previously held by The Beatles, who logged three consecutive weeks at numbers 1 and 2 in 1967–68. "Sorry" was the tenth best-selling song in the UK with combined sales of 934,000 copies. On June 10, 2016, it was revealed that "Sorry" had become the first song to hit 100 million streams in the UK.
In Australia, "Sorry" entered at number two on the ARIA Singles Chart, becoming Bieber's third top-ten hit in 2015 and his fourth overall. In New Zealand, "Sorry" became Bieber's second consecutive number-one single.
A dance video for "Sorry" was released on October 22, 2015. The video, which features the New Zealand dancers of ReQuest Dance Crew and The Royal Family dance crew, was directed and choreographed by New Zealander Parris Goebel, who also appears in it as one of the dancers. The video was initially intended to be a lyrics video and was eventually kept as a dance video. Describing it as "colorful, fun, and upbeat", Goebel said: "[We wanted to] just bring more life to it. We were going for a vintage '90s vibe. Me and two of my friends pretty much styled everyone. We all did our own makeup and were spontaneous… Most of it was my wardrobe, actually. We just kind of put together what we had." As of March 25, 2017, the music video has received 2.35 billion views on YouTube, making it the third most viewed video on the site, after See You Again by Wiz Khalifa, and Gangnam Style by PSY, the 22nd to reach 1 billion, the second fastest to reach 1 billion (behind Adele's "Hello") and the fastest amount of time for a male to reach 1 billion views.
The lyric video for "Sorry" was released on October 29, 2015. The video features a girl (played by dancer Lauren Hudson Petrilli) who goes through a day of her life, with the words of the song appearing in random places as she wanders around inside and outside her house, alongside the use of special effects. The video was directed by Zach King and Aaron Benitez.
Bieber performed the song on The Ellen DeGeneres Show on November 13, 2015. He was also a music guest on The Tonight Show Starring Jimmy Fallon. Additionally, Bieber performed the song during the 2015 American Music Awards, which took place at Microsoft Theater on 22 November 2015 in Los Angeles, California. The singer also took the stage to perform "Sorry" during the season nine finale of The Voice on 15 December 2015. Bieber performed the song live at the 2016 Brit Awards in London on February 24, 2016.
In May 2016, Billboard reported that Bieber and Skrillex were being sued by indie artist White Hinterland, who claims the duo used her vocal loop from her 2014 song "Ring the Bell" without permission. Eight seconds of the "Ring the Bell" riff is allegedly used six times in "Sorry." Co-writers are also included in the suit. Producer Skrillex responded to the claim by uploading a video of himself manipulating the vocals of co-writer Julia Michaels.
The song can be heard in the Norwegian television series Skam (4th episode of Season 3). The song is featured on Just Dance 2017, it is also one of the songs in the demo of said game.