The Extras star will be joining the West End cast from 3 October, replacing the current actor Andy Mace.
In the original Only Fools and Horses series, the character was played by Lennard Pearce from 1981 until the actor’s death in 1984.
The musical version, which is playing at London’s Theatre Royal Haymarket, has also had its run extended by three months, until 7 January.
Dennis said: “I am so excited to be playing Grandad in Only Fools and Horses The Musical. Like everyone else, I would tune in weekly to watch the hilarious exploits of the Trotters and would laugh and cry in equal measure. It was both funny and touching.
“Jim Sullivan and Paul Whitehouse have written a wonderful show that beautifully recreates that feel-good era of British comedy. I can’t wait to join the hugely talented cast and be a part of it. Lovely jubbly.”
Appearing alongside Dennis in the stage show are Tom Bennett as Del Boy and Ryan Hutton as Rodney.
As well as writing the script, Whitehouse also Grandad in the original cast for the musical.