Officer Wells on Adam-12 had trouble with this, much to Reed and Malloy's annoyance in one episode. He kept running into situations without thinking things through and ended up getting shot because of it. Based on the fact that his uniforms are missing some stripes in later seasons, he may have gotten demoted as well. But, he got a taste of his own medicine as well when he had to deal with a rookie behaving in a very similar fashion in one episode.
Angel: When Kate mistakenly believes that Angel is the Serial Killer she's looking for, she has absolutely zero qualms against searching the Angel Investigations offices without getting a warrant beforehand.
The Reagans on Blue Bloods are an entire family of these. The patriarch, Commissioner Frank Reagan, has nothing but contempt for the state department, journalists, City Hall, police unions, and anyone else who tries to impinge on his turf. His son, Det. Danny Reagan, isn't much better: He even picks fights with the U.S. Military, despite being an Iraq War veteran himself. Jamie Reagan, a beat cop, is a subversion of the trope as he tries to make peace whenever possible.
Deconstructed (and then some) in the black comedy Bullet to the Head, though the show takes aim at Boxed Crook stories in particular. A lunatic criminal, himself modeled on The Joker, is recruited by the police to solve homicides. There is no dog-petting or flirtations with redemption here: Gunter is pants-crappingly crazy and kills/mains/tortures crooks with reckless abandon.
Deconstructed in Castle: Three cowboy cops kidnap two mobsters and murder one, who turns out to be an undercover FBI agent. They frame the other mobster for his murder. Kate Beckett's mother, a lawyer, agrees to take the framed mobster's case and gets murdered.
Beckett goes a bit off script to scare the hell out of the girlfriend of a thug who had been hired to kidnap two girls.
In Chicago P.D., Sergeant Voight has this reputation, which his Precinct Commander calls him out on, and also runs his Intelligence Unit like this, playing hard and fast with police rules... but at the same time he's very safety conscious.
On CSI Jim Brass seems to have these tendencies, especially when he picks up Ray's flex-cuff to keep it a secret that Ray killed Nate Haskell after he was cuffed.Brass also has begun remarking lately that killed killers get what they deserve and is often reluctant to help catch the killers. Jim used to be much more of a By-the-Book Cop, often showing disappointment in colleagues who stepped outside the rules, and his reputation for being squeaky clean was often brought up, but around Season 9 or 10 he started getting more cynical and less rule-bound.
CSI: Miami's Horatio Cane ventures into this territory every so often, most notably when his wife was killed on their wedding day. Nothing was going to stop him from making her killers pay.
Mac Taylor onCSI: NY at the end of season 3, and several other times as well. He was a bit hung up on proving his bosses wrong and one-upping them when a suspect committed suicide and made it look like police brutality. Later on, in season 9, he goes even more seriously rogue when his girlfriend is kidnapped. He never crosses the line or forgets he has a badge, but comes very close.
Travis in Common Law; the events of the series were set into motion when his By-the-Book Cop partner Wes pulled a gun on him — because Travis was going to kill a murderous Dirty Cop. Travis's mentor actually uses the term to describe himself, and is stated to have an extremely colorful record in which he ultimately "did more good tham harm."
Community parodies this in "The Science of Illusion" when Annie and Shirley become temporary campus security guards. They end up getting into an argument about which one of them should be the By-the-Book Cop and which one should be the Cowboy Cop despite the fact that both of them are equally suited to both roles, and Genre Savvy Abed, who is following them around, ends up invoking a whole load of tropes based on this.
David Rossi of Criminal Minds has a tendency to be this, particularly if bending a rule will help a team member or save someone's life. He's not the only one- most of the team has done this at least twice.
Elle is an example of this gone too far, with her departure from the team being caused by her committing Vigilante Execution on a perp that walked. They couldn't prove she'd done it, but also couldn't trust her anymore, so she resigned.
Jordan Cavanaugh, the title character of Crossing Jordan, regularly qualified as a Cowboy Cop despite (or perhaps because of) the fact that she's not actually a cop - she's a medical examiner.
Due South has Detective Ray Vecchio, who has a tendency to bend the rules to get his man.
Ryan Hardy from The Following is a former FBI agent who is asked by the Bureau to assist with Joe Carroll, an escaped serial killer he caught a few years earlier. It soon becomes very clear that he loathes Carroll and has an obscenely easily triggered Berserk Button, almost strangling Joe to death when he's recaptured, and breaking his fingers in their first interrogation. Things get even worse when Joe manages to escape again when Joe manages to escape again, assisted by a cult of serial killers who worship him, many of whom are killed by Ryan out of his frustration at being unable to catch Joe. In the season finale, he tortures one of the cultists, drives his finger through the guy's eyeball, and then kills the man in cold blood. He then draws a gun on his sidekick to keep him from following him to Joe, partially to keep him safe and partially to keep him from keeping him from killing Joe. However, this trope is noticed by several of his FBI and US Marshal superiors, who recognize his instability but find it very hard to sideline him (and can't get rid of him because he's the expert on Joe Carroll)
Nick Knight seemed to venture into this a few times on Forever Knight for more unusual reasons-he was either trying to hide vampiric connections to cases or trying to stop a suspect who happened to be a vampire. The viewers knew why he was doing it, but his bosses got frustrated at times.
Dan Stark from The Good Guys. He gets away with it in the show but the behavior clearly ended his career, and traumatized his last partner so badly he quit the force. That same case happened to make him such a hero that he can't be fired.
Justified - U.S. Marshal Raylan Givens, both figuratively and literally. Raylan hails from rural Kentucky and almost always wears a cowboy hat. The first season actually opens with him facing off against a killer to whom he gave a 'get out of town in 24 hours or else' ultimatum and later justifies the shooting because the other guy 'drew first'. The character is meant to be a throwback to Old West lawmen.
He is actually quite professional when the crimes are not targeted at him or someone he cares about. His usual style is more laid back and Columbo-like. However, when things get personal he has no issue with breaking the rules.
Law & Order: Mike Logan and (in the beginning) Ed Green are less extreme examples. Dennis Farina's character of Joe Fontana also regularly displays these tendencies during the two seasons of the show he appeared on.
Elliot Stabler from Law & Order: Special Victims Unit. Let's just say that if he suspects you of something, wear a helmet. And a cup. Although when the show first started, it was Olivia you had to watch out for.
One of the USA channel promos for the show even says "If you like coffee, donuts, and a little flexibility with constitutional rights...."
By the time Seasonal Rot set in, every character was doing it, even Munch.
Life On Mars makes hay out of the fact that all cops in 1973 were Cowboy Cops by today's standards.
Ana Lucia in Lost is (well, was in her backstory) a rare female example.
The title character of Luther. As per the current deconstructive trend regarding this trope in fiction, it causes him no end of trouble in his professional and personal life.
McCloud was another literal cowboy cop. A marshal from Taos, New Mexico who wore a cowboy hat, cowboy boots and a leather coat while on "temporary" assignment in Manhattan! He was less 'break the rules' than bend them, but still drove his superiors crazy.
Both Crockett and Tubbs from Miami Vice had no problem tossing the rule book. This pissed off a fair number of other law enforcement officials. Oddly enough, however, their own chief, Lt. Castillo didn't seem to really mind, as he focused more on results. But then again, he was a Four-Star Badass himself, so.
Gibbs on NCIS has some cowboy in him. Once, when a perp couldn't be arrested on the evidence they had, Gibbs instead informed the rest of the guy's gang that the perp had killed their leader and secretly taken his place and iced several other gang members, but NCIS couldn't prove enough to get a conviction. Then Gibbs gave the perp a ride back to his territory, where the other gang members are waiting. Cut to a news report the next morning about a gangland killing last night. Hanging up on his boss in the middle of a lecture, counts too.
Mike Franks is probably even more of a Cowboy Cop than Gibbs, since he's retired and doesn't seem to feel like even pretending to play by the rules anymore. Arguably all the NCIS regulars have some Cowboy Cop tendencies. Do you really think that evidence gathered from breaking into a suspect's home, or hacking into their computer, or hacking into their bank's computer and pulling up their records, would hold up in court in the real world?
Similarly, The Professionals has Bodie and Doyle breaking the rules on a regular basis. Despite a serious lecture from Cowley, they usually get away with it.
Most of the main cast of Psych qualify. Shawn (and by association his partner Gus) are hired on for "Psychic" help, which here means, break every rule in the book. They are tolerated because, you guessed it, they get results (although usually they're actually closer to Bunny-Ears Lawyer and to outsiders appear harmlessly eccentric). Detective Lassiter is actually very by the book, but in the eyes of internal affairs, he's a Trigger Happy time bomb, whom unfortunately is always on the same cases as the psychic. He once is tasked with training a new recruit that very much has the personality others perceive him to. He can't stand her. Shawn's dad, a retired cop turned head of the consultants, is normally by the book, but will throw it out if he's invested enough in a case. Reasonable Authority FigureChief Vick is viewed by her bosses at city hall because she lets this go on.
Vic Mackey and the members of the strike team in The Shield are as cowboy as they come; subverted by the fact that they are also criminals. Despite the fact that they do remove some drug dealers/murderers/etc. from the streets, their primary motive is to enrich themselves and get away with it.
Vic himself is also a Deconstruction. He begins as a well-intentioned Dirty Cop whose tactics are of good consequences and is acknowledged as a necessary officer for The Barn. However, as the series progresses, he becomes more of a Rabid Cop whose behavior becomes more of a liability to the precinct. The Plethora of Mistakes he and his Strike Team commits over the course of the show becomes increasingly worse and they have to start making deals with the criminals to leave them alone, to the point they can no longer do their jobs.
Star Trek: The Original Series: It really says something about Captain Kirk that his flagrant insubordination is still being felt centuries later. (Thanks to his time travel meddling.)
Kirk is respectful to Reasonable Authority Figure throughout TOS, but he never even tried to hide his contempt for Insane Admirals, Obstructive Bureaucrat, Evil Chancellors and any tyrants who took the helm—in The Trouble With Tribbles, he seems to go out of his way to irritate the Federation official in charge of Space Station K-7. More often than not, he will refuse to consult Starfleet Command before taking actions that might have significant interstellar consequences, a tradition that lived on in captains throughout the franchise.
Starsky & Hutch often fit this trope (specially Starsky). They almost seem to be private detectives rather than cogs in a larger machine. Also, their methods include bribery, blackmail, and Mafia-style intimidation.
The Streets Of San Francisco - Earlier in his career Don Johnson played a cowboy motorcycle cop or "Hot Dog" in the episode with the same name. When Johnson was a guest on the Letterman show in 1996, he played a funny montage of clips from the episode of the times the term "Hot Dog" is said. Which was a lot.
The Sweeney starred a pair of misogynist, foul-mouthed London cops who were a brilliant example of this - but they often completely failed to catch their man, and fairly often got into real, serious trouble with their superiors.
Touching Evil (the US version) features a protagonist, David Kreegan, who has no hesitations about breaking the law to achieve an objective. In at least one case, this backfires, as the actions he takes to rescue three children from serial killer Ronald James Hinks result in Hinks being unprosecutable for the murder attempt. An even more extreme example is Krakauer, who kills Hinks and stages it as a suicide; when he is fired from OSC on suspicion of having done so, he murders yet another killer who looks to be unprosecutable. It is implied that he did not do so with impunity.
A Touch of Cloth, a British send-up of gritty crime dramas, has Jack Cloth, a parody of this trope. When he goes undercover in Series 2, he breaks not only the law, but also the rules of continuity in order to gain Macratty's trust.
The character Ralph Lamb in the 2012 series Vegas is based upon on the real-life character with the same name. Ralph Lamb was a rancher who was the sheriff of Las Vegas from 1961 to 1979. The man was well known for riding horses into town and let his fists do the talking. He also introduced modern crime labs to Las Vegas, formed the first Las Vegas SWAT team, and was generally a pain in the ass for the mafia.
The fact that he's a rancher makes him a literal Cowboy Cop.
Ironically, Cordell Walker (Chuck Norris) from Walker, Texas Ranger is literally a cowboy cop (from Texas, wears the cowboy hat, etc.) but is by the book, prefers to use his fists (or feet in the case of his signature Roundhouse Kick) rather than his gun, and is never yelled at by Da Chief (in fact Da Chief usually praises him).
White Collar tries to avert this with Peter Burke, but Neal Caffrey goes off the reservation every chance he gets. Sometimes the FBI doesn't just look the other way, but actively supports him. Perhaps the most egregious case, though, was in the episode Vital Signs, when the FBI kidnaps someone and threatens to let him die of renal failure unless he coughs up evidence against himself.
Granted, the guy wasn't actually dying. They just made him think he was.
Deconstructed in The Wire with Jimmy McNulty. Like a typical cowboy cop, he ignores his superiors' authority, plays by his own rules and suffers in his personal life for his stubbornness. However, "playing by his own rules" actually entails doing careful investigations and building cases against high-level criminals rather than cracking skulls and busting street-hoodlums like his superiors typically want. This corresponds with the show's general premise that law enforcement, like most systems in America, is fundamentally broken.
Paul Gerardi in Salamander. Who throws in his badge, goes on the run, and applies very unorthodox techniques to get to the bottom of who, or what, is Salamander. And gets very rough after his wife becomes collateral damage.
Lady Blue from the mid-1980s featured a rare female example of this trope, as the lead character was devised and depicted as a female version of Dirty Harry, complete with I.A. trying to get her booted from the force for killing too many people. It even invokes the western movie aspect of the trope, in that just as western sheriffs might be shown casually having a drink at the saloon after winning a gunfight, in the first episode the lead character of Lady Blue is shown sitting down for a manicure after blowing three human beings away.
Strike Force was another 1980s cop show built around this theme. It starred Robert Stack as the leader of a Impossible Missions Force-like crack police unit created to infiltrate and take down (read: usually kill) hardened criminals. The team is often set upon by those who don't approve of their methods.
Detective Jake Peralta from Brooklyn Nine-Nine obviously loves this trope, but his actual policing is fairly by-the-book. He tries to turn in his gun and badge after one incident of Screw the Rules, I'm Doing What's Right! only to be told that he's only on administrative leave and doesn't have to do that.
Perfect Assassins: Ben Carroway completely disregards FBI regulations by stealing a helicopter, taking a civilian with him, to chase a suspect.