Robert Wells - a Swedish composer best known for his Rhapsody in Rock extravaganza - was chosen by the Chinese Ministry of Culture and Sport last weekend.
"I have seen how they have mixed the music with the Olympic rings. It will be exciting and I am incredibly happy about this. It is the biggest thing that I have ever done," Wells said.
Wells told Swedish newspaper Expressen that he has visited China many times in recent years.
"My China Olympics adventure began eight years ago, and since then I have been back 21 times."
The composition is a blend of his Rhapsody in Rock style and traditional Chinese influences, Wells told Expressen.
A hundred composers from across the world were involved in the competition.