The 23-year-old British singer and 27-year-old American star shared a lyric video Thursday for "I Don't Wanna Live Forever" featuring Dakota Johnson and Jamie Dornan in the Fifty Shades of Grey sequel.
The song will appear on the Fifty Shades Darker soundtrack, along with a Miguel cover of Beyoncé's "Crazy in Love." Malik revealed on the Elvis Duran and the Morning Show this week that Swift's friendship with his girlfriend, Gigi Hadid, helped facilitate the collaboration.
"We were kind of in separate places when I mentioned the idea to [Taylor]," he said. "I spoke to her on the phone, and she heard the song 'cause Jack [Antonoff] played it to her. She really liked it, and she went in the studio the next day."
"The really interesting thing was she's actually friends with [Gigi], so she'd already reached out 'cause Jack had just played her the song anyway," the star added.
Fifty Shades Darker released a steamy new trailer with Johnson and Dornan last week. E! News reported in November that the film will be rated R for "strong erotic sexual content, some graphic nudity and language."
The Fifty Shades movies are based on the E.L. James erotic book trilogy. Fifty Shades Darker opens in theaters Feb. 10 with the third and final film, Fifty Shades Freed, to follow in February 2018.