The song was released as a digital download on 6 January 2017 as one of the double lead singles from Sheeran's third studio album.
"Castle on the Hill" was written and produced by Ed Sheeran and Benny Blanco.
The theme of the single surrounds Sheeran's home town of Framlingham, and he reminisces tales of 'smoking hand-rolled cigarettes' and getting 'drunk with friends' at this place, living life as a teenager.
Sheeran revealed that despite a similarity to the music of U2, the direct influence of the song came from "Fallen Empires" by Snow Patrol.
Jon Caramanica from The New York Times said, "'Castle on the Hill' has U2 influenced nervous guitar builds and wistful, largely generic lyrics about the people who shaped him."