The two-time BAFTA winner will star as senior anti-corruption Detective Chief Superintendent Patricia Carmichael in the final two episodes.
Viewers will get their first glimpse of Maxwell Martin in the role this Sunday at 9pm in the first episode after the surprise death of Stephen Graham’s undercover copper John Corbett.
The actor has won BAFTAs for Bleak House (2005) and Poppy Shakespeare (2009).
Maxwell Martin will also reunite with Vicky McClure, who plays Detective Inspector Kate Fleming, after the two appeared in BBC drama Mother’s Day in 2018.
Maxwell Martin said: “I’ve been a fan of Line of Duty for years, so was dead chuffed to be part of series five. I’m so pleased I no longer have to keep it a secret!
“I feel honoured to follow in the footsteps of the host of great actors who make up the Line of Duty family, and Jed Mercurio – of course – has written a brilliant character in Carmichael. She’s a woman on a mission.”
Line of Duty’s creator Jed Mercurio said: “I’m delighted and flattered an actor of Anna Maxwell Martin’s status agreed to play this pivotal role in Line of Duty. Anna was a pleasure to work with and brought real depth to the character of DCS Carmichael.”
You can read our review of last Sunday’s shocking episode here.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies