'The A Team' hitmaker will take to the stage with the psychedelic legends to perform their track 'Wish You Were Here' when the games close in London on August 12, reported Contactmusic.
"I'm playing the closing ceremony - which I think is kinda cool right? A lot of people think that I'm doing a song with The Who but I'm not - I'm doing a song with Pink Floyd. I'm doing 'Wish You Were Here'," Sheeran said.
He also confirmed he will appear with Pink Floyd drummer Nick Mason, but not all the surviving members of the band would take part.
Pink Floyd have been officially defunct since 1996, although they have reformed for a few one-off charity shows, notably 'Live 8' in 2005.