Sources say King has given his blessing to McGregor's casting.
Flanagan is known for such horror films as Before I Wake and Hush, but also recently turned King's Gerald's Game into a popular Netflix series. Stanley Kubrick directed the 1980 adaptation of King's original novel, which starred Jack Nicholson and Shelley Duvall and is revered as one of the best horror movies of all time (even though King himself famously wasn't particularly fond of the adaptation).
EU Rubbishes Labour's Brexit Vision, Calling it "Cakeism"
The Prime Minister seems to have averted disaster for her government this week - but maybe only this week. Anna Soubry tweeted: 'If the PM goes back on that there will be no agreed amendment that I can support'.
But with It earning more than $700,000 worldwide for New Line previous year, Doctor Sleep is now being fast-tracked into pre-production.
The story of Doctor Sleep picks up decades after the events of The Shining, with Danny growing up into a damaged man after surviving his father's murderous rampage at the Overlook Hotel. His worsened drinking problem equally suppresses his pain and his previously titular "shining" ability.
However, his powers return when he sobers up and uses his gift to help the dying at a hospice, where he establishes a psychic connection with a young girl who shares his extreme abilities.
McGregor can next be seen in Disney's "Winnie the Pooh" adaptation "Christopher Robin".