The boy band are to cover Blondie's classic One Way Or Another for Red Nose Day, which is happening on 15 March next year.
In a statement, Harry Styles said: "We have grown up with Comic Relief and taken part in lots of Red Nose Days at school so we were thrilled to be asked to do this year's Red Nose Day single.
"It's such an honour for us. We can't wait to perform our version of this iconic pop song and raise as much money as possible for this incredibly important cause that is really close to our hearts."
And Zayn Malik added: "At school Red Nose Day was a big deal! Me and my friends used to really look forward to it - I remember one year we all came in in our pyjamas which was pretty cool!"
The single will be available to pre-order on iTunes from 31 January - and will go on sale properly in February.
The boys apparently got a ticking off from cops in NYC last week.
Watch MTV News on the hour every hour on MTV - Sky Channel 126 and Virgin Channel 134