He will play the dad of a lonely 12-year-old, Chloe, who befriends a local tramp in the 60-minute film, which will be shot in 3D – the first time the BBC has filmed a fictional programme this way.
Sheridan Smith was also today named as playing the mum, while it had already been announced that Hugh Bonneville was taking the starring role.
Smith said: ‘David is such a brilliant writer, and the character just jumped off the page when I read it. I can't wait to work with Hugh and Johnny.’
Mr Stink is being produced by the BBC’s in-house Comedy Productions in association with David Walliams and his production company DEW Productions.
Walliams worked on the adaptation with Men Behaving Badly creator Simon Nye.