Roger Taylor wrote the melody and chords of this song for the Highlander film, then Freddie Mercury wrote a new bass line, added some instrumental spacers, changed the order and produced a new mix with David Richards. Taylor was reportedly very annoyed that Mercury had almost completely re-written the song behind his back (reportedly whilst he was on holiday!), so perhaps that explains why the song was still credited only to Taylor. Roger's version is at the end of the film; Freddie's version is on the album.
Not only was this song used in the Highlander film, but 2/3rds of the songs from A Kind Of Magic appear as well, making it the unofficial soundtrack of the film.
At the Highlander film's climax, when MacLeod (Christopher Lambert) leaves Rachel (Shelia Gish), his parting words are, "Hey, it's a kind of magic." The phrase "A kind of magic" was the starting point for Roger Taylor to write this song. Other references to the film in the lyrics include "One prize, one goal" and "No mortal man."
The album A Kind of Magic is Queen's twelfth studio album but the first to include a title track.
This was a big song on Queen's 1986 Magic tour, which was their last with the original members, since Freddie Mercury would be diagnosed with AIDS the following year and was too sick to tour after that.
Roger Taylor noted in the Days of our Lives documentary that "you just got a sense that he (Mercury) felt that he would not be able to do any more shows," which raises the question of whether Mercury had already been diagnosed with AIDS in 1986 but chose to make the Magic tour his final live shows. This was also the tour where Mercury wore his white slacks and yellow jacket combo, which has since become his signature get-up.