A film line, then a bass figure while Taylor was in Los Angeles
Roger Taylor wrote A Kind of Magic from a line in Highlander, and Freddie Mercury rebuilt it while Taylor was in Los Angeles. In the film, Christopher Lambert’s Connor MacLeod says “It’s a kind of magic.” Taylor built a song on that sentence. Other lines from the picture stayed in the lyric: one prize, one goal, and the rule that there can be only one. The version that plays over the end credits is his, darker, closer to the movie. The single is not that version.
Mercury picked the track up during the week Taylor was away. He turned the arrangement around and put a bouncing bass figure under it, so the song moved like a dance record instead of a film cue. Queen and David Richards produced the album across sessions from September 1985 to April 1986, at Musicland in Munich, Mountain in Montreux and Townhouse in London. The rewrite belongs to that stretch of work. The room is not the point. The week away is. Taylor came back, heard it, and said he liked it.
EMI released the single in Britain on 17 March 1986. It peaked at number 3. The British B-side was A Dozen Red Roses for My Darling. Capitol put it out in the United States on 4 June, and it reached number 42 on the Billboard Hot 100. The album A Kind of Magic followed on 2 June and entered the British album chart at number 1. Russell Mulcahy, who had directed Highlander, directed the video. The Magic tour that summer was the last with all four of them.
I realised he was going away to L.A. for a week, so I got hold of it and I changed it round completely. When he came back I said, “What do you think?” And he said, “Oh, I like it.”
(Freddie Mercury, quoted in Classic Rock)

The useful split is between the two recordings that share a title. Taylor’s end-credit version keeps the film’s temperature. Mercury’s single is built for a room that wants to move. John Deacon is the bassist on the album. The bouncing figure is the spine of the rewrite. Mercury’s point, in the quote he gave about that week, was the change itself: he took a song that was leaving town with its writer and sent back a different record.
By the time the Magic tour reached Wembley in July 1986, the single had already been a British top-three hit for months. A Kind of Magic is the rare case where the film cue and the hit are both real, and the hit exists because one of the writers was in Los Angeles for seven days. The darker version stayed with the movie. The single is the one with the bass figure.