The singer will take to the stage with Pink Floyd, after previously being rumoured to be collaborating with The Who.
"I'm playing the closing ceremony - which I think is kinda cool right?" Sheeran told Australian radio station Nova.
"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 added that the performance will not include all remaining members of the band but confirmed that drummer Nick Mason would be involved.
One Direction, Jessie J and Sir Elton John have all been linked to the closing ceremony, which will celebrate the best of British music.
Watch Ed Sheeran discuss more upcoming collaborations below:
Photo gallery - London 2012 Olympics: