Simon Cowell is said to have asked the bands, both previous X Factor finalists, to sing on the cover of Rose Royce's 1978 hit 'Wishing on a Star'.
He was apparently concerned that this year's "average" contestants weren't enough to ensure the song becomes a chart success and so added established artists for the first time.
An insider told The Sun: "Simon and the other Syco execs want huge sales this year and weren't sure the contestants would get that on their own.
"Now they'll be using One Direction and JLS's combined fanbase to sell the song. It's a no-brainer and is bound to be a huge seller now."
A spokesman confirmed: "As Simon has a personal involvement in this year's charity he has asked two of the country's biggest acts to make this year's X Factor charity single the biggest of the year.
"He asked One Direction and JLS to sing on the track to give the song something extra special - and encourage all their fans to buy the single and raise lots of money for the charity."
Previous X Factor charity singles - 'Hero' in 2008, 'You Are Not Alone' in 2009 and 'Heroes' last year - have all reached number one.
'Wishing on a Star' is due to be released on November 20 and all proceeds will go to ACT & Children's Hospices UK.
JLS will perform on the X Factor results show on Sunday, while One Direction will appear the following weekend.
> X Factor finalists visit children's hospice: Pictures
> X Factor stars record charity single 'Wishing on a Star' - pictures
> One Direction, Westlife, Susan Boyle, JLS for Children in Need 2011
Watch One Direction's video for 'What Makes You Beautiful' below: