"It Ain't Me" is a song by Norwegian DJ Kygo and American singer Selena Gomez. It was released by Interscope Records, Sony and Ultra on 16 February 2017 as the lead single from Kygo's debut extended play Stargazing (2017) and it appears as an international bonus track on Gomez's third studio album, Rare (2020). The song was written by Kygo, Gomez, Brian Lee, Ali Tamposi, and Andrew Watt and produced by Kygo, Watt and Louis Bell. An EDM, dance-pop, electropop and tropical house song, "It Ain't Me" comprises an acoustic guitar line, and a build-drop arrangement in its chorus featuring pulsing piano notes, bass, synthesizers, finger-snap claps and pan flute melodies. Gomez sings the track in a husky tone, while in the chorus her vocals are reduced to recurring syllables. The lyrics are nostalgic and narrate a past relationship ruined by alcoholism. .