The much-loved Queen anthem The Show Must Go On, the band’s last single released before Mercury’s death in 1991, will be performed at the finale of the show, which opens on Friday.
The tribute will be performed on the castle esplanade by the full cast of the show, including the 250-strong massed pipes and drums ensemble, accompanied by a spectacular fireworks display above Edinburgh Castle’s esplanade, where the show is staged.
It has been lined up months after the Queen biopic Bohemian Rhapsody, which explored Mercury’s relationship with his band-mates, won four Academy Awards, including a best actor honour for star Rami Malek.
Sergeant David Fiu, who is appearing in the Tattoo with the New Zealand Army Band, will step into the shoes of Mercury to sing the anthem in Edinburgh every night of the show’s three-week run.
Other highlights of the Tattoo programme are expected to include music from the soundtrack of the blockbuster Hugh Jackman movie The Greatest Showman and the Bruno Mars hit Uptown Funk.
The Neil Diamond classic Sweet Caroline and the terracing anthem You’ll Never Walk Alone will also feature, and a tune to commemorate Nelson Mandela’s famous 1993 visit to Glasgow after he was released from jail in South Africa.
They will be performed by the cast alongside traditional Tattoo favourites like Amazing Grace, Loch Lomond, Scotland the Brave and Auld Lang Syne.
Other expected highlights in the 69th annual Tattoo include a specially-formed group of high school and university musicians from Beijing, in China, the Trinidad and Tobago Defence Steel Orchestra, the German army band Kassel and France’s La Musique de l’Artillerie, who will stage a spectacular “Can-Can” sequence.
Some of the planned sequences have been designed to replicate the effect of a Kaleidoscope, which was invented in Scotland more than 200 years ago by David Brewster.
The Freddie Mercury tribute has been revealed three years after the Tattoo honoured David Bowie, with a spectacular “Life on Mars” sequence just months after his death.
Brigadier David Allfrey, chief executive and producer of the Tattoo, said he got the idea for the Mercury tribute after watching Bohemian Rhapsody on a flight to Australia during research for this year’s production. The Show Must Go On was written and recorded by Queen while Mercury was battling the effects of his HIV/AIDS-related symptoms.
He added: “I’ve got a house full of Queen records. Their music, which mixed orchestral, classical and opera with rock and roll, was what I grew up with. When I saw Bohemian Rhapsody on my flight I just thought this would be a fantastic thing to do in the show.
“The Show Must Go On was always the track I wanted us to do. There is so much power and pain in the song and the story behind it. It will be the most dramatic moment in the show - it’s got everything in it.
“I must admit I have also seen The Greatest Showman a number of times - there’s some really beautiful music in it and it’s really taken off. We’re always following what people are listening to. We can’t go too cutting edge, as we don’t have rock ‘n roll audience.
“Within the conventional framework of a military Tattoo we always look to strike a balance between time-honoured tradition and innovative ideas. Audiences can expect plenty of tradition - but with a twist."