The Little Britain comic's children's novel has sold 250,000 copies and was shortlisted for Blue Peter's 'Book of the Decade' title.
"I am beyond thrilled that BBC One is adapting my children's book Mr Stink into a family film. I have written the script and can't wait to see actors bring it to life," said Walliams.
Mr Stink follows the story of a schoolgirl who forges a friendship with a homeless man that hides in her family's garden shed.
The Britain's Got Talent judge has penned other children's books including The Boy in the Dress, Billionaire Boy and Gangsta Granny.
BBC One controller Danny Cohen said that Mr Stink was a "heart-warming, nose-clenching and funny tale which will appeal to viewers of all ages".
Head of BBC comedy Mark Freeland commented: "I am delighted that the BBC is continuing its relationship with the multi-talented David Walliams. Mr Stink has become an instant classic and it's so exciting to see it come to life on TV."
> David Walliams to join Jonathan Ross panel show 'Trending Topics'
> David Walliams: 'Friends ask me if Simon Cowell is gay' - NTAs video