The Brit Award-winning rapper will play the grand piano with the BBC Concert Orchestra for the soundtrack of Planet Earth: A Celebration.
The TV special will be voiced by Sir David with the BBC saying it aims to cheer up viewers at “a time of international uncertainty”.
It will feature eight sequences of animals overcoming adversity taken from Planet Earth II and Blue Planet II.
Composer Hans Zimmer has created new compositions and rearranged the original scores.
Highlights will include the famous scene in which a newly-hatched marine iguana is chased by snakes, as well as an octopus fighting off a shark by pushing their arms into the gills to suffocate the predator.
Dave said of his involvement with the show: “I’ve always been a fan of powerful natural history documentaries. This is a programme where nature and music come together, so it was only right that I lent my talent, my time, and my attention to this project.
“It was a pleasure to work alongside Sir David Attenborough and Hans Zimmer.”
Dave and the orchestra were filmed for the programme in the Lyndhurst Hall at Air Studios, London.
Orchestra director Andrew Connolly also said: “To bring the Concert Orchestra out of lockdown in order to create new music with Dave and Hans Zimmer for Planet Earth: A Celebration was very special, and that feeling of coming together is at the heart of our performance.”
BBC director general Lord Tony Hall added: “This thrilling journey around the world promises to lift everyone’s spirits.”
Planet Earth: A Celebration will air on BBC One later this year.