An Adventure in Space and Time, written by Mark Gatiss, will tell the story of the formation of the sci-fi drama in the early 1960s.
The actor, best-known for his role as caretaker Filch in the Harry Potter films, gave a "wonderfully touching and subtle performance" said Gatiss.
The one-off drama will be shown as part of Doctor Who's 50th anniversary.
Bradley said he was "absolutely thrilled" to be offered the role by Gatiss after starring in a 2012 episode, Dinosaurs on a Spaceship.
"When he asked if I would interested, I almost bit his hand off!" Bradley said earlier this year.
Scottish actor Brian Cox, will appear alongside Bradley as BBC Head of Drama, Sydney Newman, who was credited with the creation of the show.
Doctor Who was first broadcast on 23 November 1963, with a four-part adventure known as An Unearthly Child.
Hartnell, who died in 1975, starred in the series from 1963 to 1966 before being replaced by Patrick Troughton.
An Adventure in Space and Time is one of a number of programmes that will mark Doctor Who's half-centenary later this year.
A new picture of actor David Bradley as the first Doctor, William Hartnell, has been released by the BBC.