Doakes enlisted in the U.S. Army and there earned his nickname "Sane James" for his ability to detect the mentally unhinged. Doakes went on to become an Army Ranger, serving with the elite Regimental Reconnaissance Detachment. After spending many years in black operations, Doakes gave up his military career, electing instead to use his skills to help civilians as a police officer. Doakes's police career grinds to a halt when he receives excessive force citations; his volatile, angry nature proves he cannot work well with others. Doakes was partnered with Maria LaGuerta, which ended after she was promoted following a high-profile drug bust.
Season one
Doakes hates Dexter Morgan; he is the only person in Dexter's life who can see through his mask of normality. Doakes suspects that Dexter is hiding something, and has no reservations about telling him so. Ultimately, Doakes realizes that Dexter is withholding vital information on the Ice Truck Killer case, to the point that he is driven to physically attack him, only for Dexter to expertly fight back.
Season two
LaGuerta tells him to back off, but Doakes begins following Dexter in secret. Doakes ends his investigations when he finds Dexter attending a Narcotics Anonymous meeting, supposedly for heroin addiction; Doakes erroneously believes Dexter's dark secret is that he is a drug addict. Feeling sympathetic towards Dexter for once, Doakes briefly leaves him alone. Doakes resumes the hunt after Debra reveals that Dexter doesn't even smoke. After Doakes starts investigating Dexter's past, Dexter goads him into a fight—seemingly unprovoked—in front of the entire squad room. Doakes is initially prepared to accept dismissal and take a high-paying security job LaGuerta set up for him, only to begin suspecting Dexter is the notorious Bay Harbor Butcher when Special AgentFrank Lundy mentions shoddy blood work as a reason for the acquittal of one of the Butcher's victims. Doakes, in the course of following Dexter, stumbles upon Santos Jimenez's remains and Dexter's blood slidecollection box, and realizes Dexter's secret: He is the Bay Harbor Butcher. Doakes becomes the prime suspect in the case when he leaves Miami to get the blood slides analyzed. Doakes attempts to apprehend Dexter himself in the Everglades, but Dexter gets the upper hand and locks him in Jimenez's cabin until he can decide what to do with him. In the end, Dexter's erstwhile lover Lila Tournay finds the cabin, and makes the decision for him: after finding out from Doakes that Dexter is the Bay Harbor Butcher, she tries to protect him by blowing up the cabin, thus eliminating Doakes as a witness. Doakes's incinerated remains are found along with the dismembered body of Jose Garza, and so the case is closed, with the official conclusion being Doakes was the Butcher. Later on, Lila attempts to burn Dexter along with Rita's children, but he survives and murders Lila, citing Doakes as a reason. Doakes's funeral is largely unattended, with the exception of LaGuerta, Dexter, and Doakes' mother and sisters. Doakes is replaced as sergeant by Angel Batista.
Season seven
When LaGuerta finds the blood slide with Dexter's victim Travis Marshall's blood on it, she suspects that the real Bay Harbor Butcher is still alive. Dexter, determined to stop LaGuerta, cements his frame job of Doakes by planting kill tools and plastic wrap at an abandoned ship yard. In the season finale, Doakes makes an appearance, in flashbacks of previously unseen confrontations between him and Dexter set before the events of season 1, and detailing how he became suspicious of Dexter, as well as his romantic involvement with LaGuerta—a major motive behind her determination to clear his name.
Differences from the novels
In the novels, Doakes's first name is "Albert", and he served in El Salvador with the U.S. Marine Corps. Dexter believes that Doakes has a "Dark Passenger" of his own, and deals with it by being as violent as he legally can in his job. After LaGuerta's murder at the end of Darkly Dreaming Dexter, Doakes believes Dexter was the killer, and tails Dexter in Dearly Devoted Dexter, intending to "catch him in the act". Instead, Doakes himself is captured by "Dr. Danco", a psychopathicdoctor who served alongside Doakes and blames him for the torture he suffered at the hands of Salvadorean guerrillas; to get revenge, he tortures Doakes by removing his feet, hands, and tongue. In Dexter in the Dark, Doakes returns briefly, but cannot communicate.