The song was written by Afrojack, Guetta, Mikkel S. Eriksen and Tor Erik Hermansen of production duo Stargate, English singer-songwriter Ellie Goulding, English singer Jamie Scott, and American musician Ryan Tedder of the band OneRepublic. The song was produced by Afrojack, Guetta, Stargate and Dutch production duo DubVision. Although Goulding was the vocalist on the demo version of the song, the vocals on the final version were performed by American singer Luxtides (a.k.a. Danni Bouchard).[4] However, she is not billed as a credited singer.
"Hero" was described as an "inspiring summer song" and "a crossover between pop and EDM".[5] American web site EDM.com said that the song clearly refers back to the sound of the early 2010s which since then had eroded a bit, but that "(...)after a brutal year devoid of live music thanks to the fury of COVID-19, many ravers have found themselves nostalgic, desperately clinging to memories of simpler times in the throes of solitude. Afrojack hopes "Hero" can serve as a time machine."[1]