The song was first revealed when Mendes unveiled the album's track listing. On May 1, 2018, Mendes announced the single release on Twitter with a graphic of the lyric "you can't take my youth away". Khalid retweeted Mendes and added a corresponding lyric with hearts: "Pain, but I won't let it turn into hate". The lyrics were also posted on billboards across New York, Los Angeles, Chicago, Miami, Washington, D.C., Toronto, London, Berlin, Stockholm, Rio, and Melbourne. The song premiered on Zane Lowe's Beats 1radio show, where Mendes talked about collaborating with Khalid. Mendes said that the song was inspired by the Manchester Arena bombing in May 2017. He texted Khalid: "When we get together, we have to make a statement, we have to move, we have to write about what's going on in life and how the youth is feeling", saying that they "have the voice to do that". They got into the studio in the aftermath of the attacks. Mendes shared that, "You're always terrified going into a session knowing like, 'Okay, this is going to be a big session. I have one day. Is it gonna be a great song or not?' I remember I woke up in the morning and the whole thought of my youth trying to be taken away from me . Not youth as in my age—youth as in my love, my happiness, my joy, my purity. It's not even about age; you could be 50 and your youth is there, it's in you. And all of these horrible things happening in the world, all of the headlines, it felt like everyday it would just be pulled more and more out of us, and I was like, 'This is what I have to write about.'" An acoustic version of the duet was released on May 24, 2018. On December 21, 2018, a remix of the duet was released featuring Jessie Reyez.
Composition
"Youth" is a midtempo pop and R&B vocal duet about retaining youth in the wake of adversity. It opens with a slow beat, before a bassline kicks in and it escalates into a singalong chorus, which features "a steady beat and Latin-tinged acoustic guitar riffs". The song contains references to the current social and political climate.
Critical reception
Sam Prance of MTV News regarded the song as "one of the most uplifting and life-affirming songs of the year so far", writing that "Shawn and Khalid each other on it perfectly". Patrick Hosken of the same publication opined that Khalid's "gravelly voice pairs nicely with Mendes's own patented rasp", stating that "the message of the song is simple but effective". Mike Nied of Idolator deemed it "one of the 19-year-old's most ambitious tracks yet".