Dupin is definitely the protagonist—for the narrator, at least. After all, he's the smart guy who finds the letter.
Yet he doesn't seem to drive the action in the way a traditional protagonist does. Or, at least, he shares the action-driving with G—. Plus, his motivations are far from heroic. Money, politics, and bragging rights seem to drive him almost as much as the delight he takes in reasoning, thinking, and detecting. Still, the narrator sets up the story so we can't help gloating a little over his success.