The One Direction star surprised his fans by unveiling the track on his Twitter account and making it available to listen to on all major streaming platforms, reported Us magazine.
"Been working in the studio, wanted to share this song I just wrote with u guys. Thank you for always being there (sic)" he wrote.
In the black-and-white video, the Irish singer-songwriter croons about a girl he can't get over as he stands in front of a microphone while strumming a guitar. "If the whole world was watching I'd still dance with you," he sings.
The 23-year-old singer, recorded the song with Adele's producer Greg Kurstin and he co-wrote the track with long-time One Direction collaborators Jamie Scott, Mike Needle and Daniel Bryer.