David will guest star as the Doctor in the CBBC drama across two episodes this autumn.
Investigative journalist Sarah Jane Smith, a one-time companion to the Doctor, will be reunited with her old friend in the third series of alien-busting adventures on CBBC from September.
Elisabeth Sladen, who plays Sarah Jane, said: “When I heard the news that David was going to be joining us I was absolutely over the moon.”
Russell T Davies, executive producer of the show added: “Viewers thought they may have to wait until November for the next full episode of Doctor Who, but this is an extra special treat.
“And it’s not just a cameo from David – this is a full on appearance for the Doctor as he and Sarah Jane face their biggest threat ever.”