'Gold Forever' will be available from March 13 for digital download and will hit the shelves on CD the following day.
Written by Steve Mac, Wayne Hector and Claude Kelly, the track has been described as "a ballad to rave to".
Singer Max George said: "This song is about a day in your life that you never forget. It's an upbeat, feel-good track and our favourite so far. We're really excited to get it out there, and delighted that it is supporting such a great cause."
Jay McGuiness added: "We're in a position where we can contribute to Comic Relief. We grew up watching it as kids and to be involved is crazy but an absolute honour. We hope we do everyone proud."
George, McGuiness and bandmates Siva Kaneswaran, Tom Parker and Nathan Sykes join past acts such as The Spice Girls, McFly, Girls Aloud and Sugababes on the roster of popstars that have recorded singles for the charity.
The Wanted will perform 'Gold Forever' on Comic Relief: Funny For Money on Red Nose Day, Friday, March 18 at 8pm on BBC One.