The 62-year-old actor has been cast as the leading man in the new crime drama, created by Vera’s Paul Matthew Thompson and Blood producer Jonathan Fisher.
Dunbar will star as Detective Inspector Alex Ridley, who reluctantly retires from the police force after 25 years in the homicide division.
However, his new quiet life is quickly disrupted when his former protégée, DI Carol Farman, contacts him for help when a new murder case proves particularly difficult.
Acting as a consultant, Ridley is soon back in his element - but will he be able to solve one last case?
On his new project, Dunbar said: "I don't think I've ever headed into a production with more excitement and enthusiasm.
“As an actor I know how rare it is to be given such a wonderful opportunity, and the combination of Polly Hill and Chloe Tucker at ITV and Jonathan Fisher at West Road Pictures means we are in both safe and creative hands.”
Watch: Vicky McClure and Martin Compston to get AC-12 tattoos after Line of Duty finale
"Jonathan and I worked closely together on the very successful series Blood, and I'm confident we can bring some of that magic to Ridley," he added.
“Here's to getting the team together and developing a show that audiences can find both entertaining and engaging."
Writer Fisher added: "ITV has a fine tradition of nurturing much-loved detective series, and it's a real privilege to be bringing Ridley to the channel."
Watch: Jed Mercurio dropped hint that Ian Buckells was H during Line of Duty's first series