Minor nitpcik, but Asimov’s Hari Seldon first appears in a short story published in 1942, and last in Forward the Foundation in 1993, which puts him in the top 10.
Technically his first appearance is as a speaking holographic image, but that should count, imho.
Albert Campion, by Margery Allingham 1929-1966
Peter Clancy, by Lee Thayer 1919-1966
Dalziel & Pascoe, by Reginald Hill 1970-2009
Father Dowling, by Ralph McInery 1977-2009
Gervase Fen, Edmund Crispin 1944-1977
In a complete inverse of this there’s Rumpole of the Bailey (1978-2009) where Rumpole is always just about 70, but the stories are set in the present day, whenever that is. This means that in the first set of stories it’s said that Rumpole was a veteran of World War II, but in later ones he wasn’t.
George Gently by Alan Hunter 1955-1999
Ganesh Ghote by H. R. F. Keating 1964-2009
Ebenezer Gryce by Anna Katherine Green 1878-1917
Matt Helm by Donald Hamilton 1960-1993
45 is a high bar. I’m tossing in a couple of other 40+ because you’d never hear of them otherwise.
Inspector Schmidt, by George Bagby 1935-1983
Colin Thane, by Bill Knox 1957-1999
Ludovic Travers, by Christopher Bush 1926-1968
A couple of comments on earlier names.
Trying to pin down what was Leslie Charteris’ role in the Saint books after 1970 is frustrating. Everybody agrees that he wrote nothing after 1970 (or 1971, depending on who you believe). He did something to the tv show novelizations written by others, but whether that was rewriting, touching up, editorial commentary, or merely reading them is impossible to say. If it were my list I’d put him at 40 years.
Trying to define posthumous publication is also foggy. I’d have no problem including works in the pipeline at an author’s death. But Agatha Christie wrote *Curtain *during WWII and intended it to be posthumous. It happened to come out when she was still alive, but it violates the spirit of the rule, to my mind. The last true Poirot novel is Elephants Can Remember in 1972, giving him a still respectable 52 years.
Ray Bradbury wrote about Elliot family not the Eliot. From the Dust Returned is kind of a cheat, really an old short story collection with some connective tissue.
Then there’s the mysterious case of Ed Hoch. The master of the mystery short story, he wrote nearly 1000 starting in the 1950s and continuing to his death in 2008. He wrote dozens of series characters and returned to them over and over. I can’t find a complete story listing online, but it’s possible that one or two of his characters span 45 years.