Edinburgh cop John Rebus, based on the books by Ian Rankin, and DCI Matt Burke, star of ITV's long-running Glasgow-based Taggart, will battle it out in a new sketch show for the annual charity fundraiser on Friday, 20 November.
Rebus actor Ken Stott said: "Inspector Rebus is a great character, so when the opportunity came up to revive the role for BBC Children in Need, and really have a bit of fun with it, I was happy to take part."
Alex Norton, star of Taggart, said: "I originally thought of getting these two characters together for BBC Children in Need last year, but we couldn't get Ken at the time. We've managed this year and the sketch is even better than I'd hoped for – it's very, very funny.
"I completely support BBC Children in Need and I'm always delighted to do things for them. It's good to know that whilst we're having fun, something great is being achieved."
Among the other acts performing for Children in Need include Paisley-born singer Paolo Nutini and pop artist Little Boots.