The rules are simple, the characters must work for a law enforcement agency rather than being freelance or specifically military.
in descending order...
Jim Gordon (Batman)
Be it in the comics, The Animated Series or the two most recent films James Gordon is a good cop. Intelligent and principled he is not afraid to put his life on the line to see a bad guy brought to justice. Nor is he afraid to bend the rules to get the job done when bureaucracy gets in the way. Sure, he's got an even more effective in the form of The Batman but he's still a stand out character on his own. The greatest crime that the Tim Burton films committed was leaving the Commish on the sidelines.
Zack Allen (Babylon 5)
Ahhh, controversy. I know that for most fans of the series Michael Garibaldi is going to be the obvious choice but I personally reckon that Zack was a better cop. Sure, Garibaldi was skilled and dedicated and a mean Starfury pilot to boot, but that's just the kicker. Garibaldi was full on Hero material whilst Zack was the dedicated plodder that got the job done, even though he was given to occasional bouts of heroism himself. He made some important decisions as his time as head of Station Security on B5 and always acquitted himself well, even if his uniform was a little ill-fitting.
This may well confuse a few people that know me well and it confuses me a little bit. The guy above is John Stewart, one of several Earthmen (and literally thousands of beings) who have acted as "Cosmic cops" for the Guardians of the Universe. He's generally not regarded as the best GL (that honour usually falls to Hal Jordan) so why is he here?
Justice League is why. His presence as the GL in that series firmly sets him up as a hard-nosed cosmic cop, far more so than Green Lanterns are generally portrayed. In this incarnation he is much more of a cop than he is a Super-Hero so he stands out enough from the crowd to get this perfectly respectable entry here.
Constable Odo (Star Trek: Deep Space 9)
Again, there are better security chiefs around on Star Trek but Odo is different, mainly because he doesn't work directly for the commanding officer but on behalf of the law but also because he's the only one that sleeps in a bucket. His gruff nature and pasty face make him unappealing but somehow we come to trust this guy, even if he comes from a race of nasty-minded world-conquerors.
Samuel Vimes (Diskworld)
Although coming from humble beginnings on the streets of Ankh-Morpok and eventually achieving the heady heights of nobility Vimes is as dedicated a cop as you are likely to find. He's no great detective and has little to no respect for authority but he gets the job done through sheer bloody-mindedness. He may occasionally get overshadowed by some of his subordinates (Carrot in particular) but Vimes really is the man you want in charge of your police force, or in this case City Watch.
Both Mulder and Scully made the shortlist for this run-down but only Scully made the final cut, why? Mulder is intelligent and relentless but gets side-tracked far too easily. Scully may not be the visionary of the pair but she knows how to go through the motions and prioritise effectively. If only she could keep hold of her gun she'd rank higher.
Grammerton Cleric John Preston (Equilibrium)
Starts off the story as a good-old stone-faced cop before relenting half-way through the movie and serving justice in a way that doesn't serve the law very effectively. Now I've tried to avoid cops that rebel against the system too much for this list as that tends to make them better heroes than cops, but in Preston's case I'm making an exception.
Primarily because without exception Preston has the best physical skills on this list coupled with an insightful mind and effective intuition, he's the kind of cop you would want working your case...unless you have something to hide that is.
Alfred Bester (Babylon 5)
Those of you annoyed that Garibaldi didn't make the list are going to be doubly annoyed with me now that this guy has made the top 5. Bester is loyal (in his own way) and dedicated with a strong determination to see a job through to the end. Although usually a villain for purposes of plot you also have to offer him a grudging respect, partially because he's the only character I know that can think of being treated as a Pinata as a compliment.
Even before becoming Robocop Alex Murphy was a good cop and whilst his death and resurrection were tragic he went on to become a truly great cop. Even with his very significant edges he was restored to being a very human character who was able to remember that he was a cop even when revenge was on the line.
Forget the Stallone Movie. Please, just put it out of your mind and remember that before Robocop was this guy, a guy so dedicated to the law that it was pretty much his entire life. OK, so he's perhaps fascististic and brutal by our standards but what he does is perfectly acceptable for the system he operates in. He has the skills, the presence and the determination and that makes him our number 1 cop.
Also rans: Fox Mulder, Bravestarr, Matt Parkman, Deckard, Jill Valentine.
Of course, feel free to argue over my assumptions here, that's what the comments box is for.