24: Had two of its most prominent characters like this. Tony spent the first season often disagreeing with Jack on just about everything but at the same time did show some genuine sympathy to his plight. Chloe started out as a complete pain in the ass who eventually evolved into one of the very rare people Jack could always count on. Additionally, on the long line of obstructive bureaucrats throughout the series, 90% of them usually wind up developing or showing a good side that reveals that they aren't so bad, although there are a few exceptions.
100 Deeds For Eddie McDowd: Has the titular character going from antagonizing Justin while he's a dog to helping him when he's in trouble. The Drifter also counts.
Let's be sincere, in the Spanish Sitcom Aída everyone acted like a total jerk at least one time, even the most innocent ones like Soraya, Chema or Fidel. However, the most prominent ones are:
Luisma does a lot of idiocies and makes fun of others, but most of his jerkassery is due to his stupidity, and he definitely has a huge heart of gold inside him.
Jonathan is the typical delinquent son who bullies most people (mostly his Camp Gay friend Fidel), but he definitely loves and cares about his family and friends.
The same goes to the matriach of the Garcia family, Eugenia.
Perhaps the most prominent one is the owner of the Reinols' Bar, Mauricio Colmenero. Usually, he's a narcissistic, pervert, racist, homophobe and unpleasant Jerkass; who mistreats his employees (particularly Oswaldo "Machupichu") and treats EVERYONE (no exaggeration) like total crap. However, during the show, he had a lot of Pet the Dog moments who make him onto this trope: He loves his mother dearly, is protective with his homosexual little brother, acts like a surrogate father to his niece "Macu", has a strong friendship with the Garcia and the Martinez families, and even shows a soft spot to Machupichu (As seen in the Christmas Episode). In fact, he's a huge jerk with an equally huge heart of gold.
All in the Family's Archie Bunker is one of the most famous personable jerks on American TV, who gradually developed a heart of gold as the years went by. While he was a bigot, his attitudes came about more due to the society he grew up in, rather than genuine malice or racism. Once he actually got to know other cultures and peoples better, he was able to accept them at least a little more easily.
What set Archie apart was that he while had initial dislike of certain groups, he also wasn't a violent man, and was appalled at groups who did use violence and fear.
The Amazing Race: In the sixth season of this reality series, Jonathan was usually unmercifully mean to his wife Victoria (his race partner) and even other teams, but in the episodes taking place in African countries he was shown embracing the culture, mingling with the locals, and giving candy to children.
Battlestar Galactica (Reimagined): Dr. Cottle is a grumpy, sarcastic, chain-smoking, cantankerous, uncompromising doctor who's downright feared by many of the fleet because of his gruff, unsympathetic attitude and willingness to amputate. He's also the first to not discriminate against the Cylons, treating Athena and her pregnancy with concern as he would anyone else and is visibly furious when Athena is almost raped by Lt. Thorne, occasionally shows signs of warmth for his patients, and is truly moved when Laura Roslin thanks him for never giving up on her when she should've died years ago, but she tells him to cut it out, go grumble, and light a cigarette, lest he ruin his image. He fondly bids her farewell anyway.
Donnelly Rhodes's delivery of Cottle's line: "I don't know what to say," wavered a little. This and the way Cottle departed suggested that the Doc was a little choked up.
Kara Thrace, a little. Despite her bad habits and occasional rudeness, she truly is a very caring person. With Kacey, Zak, Athena...
Gaius Baltar. Despite being self-centered, he is actually quite compassionate and emotional, and becomes less selfish as the series goes on.
Blackadder Goes Forth: Captain Edmund Blackadder, who definitely has the meanness streak present in his ancestors, but is at least willing to acknowledge the talents of his subordinates and showed compassion and sympathy for all of them when they're about to go over the top. It's also good to note that despite being a soldier, he is the only Blackadder not to commit murder. Unless you count the pigeon Speckled Jim, but considering one ancestor killed his uncle (who happened to be the king) and another directly or indirectly caused the deaths of seven people, a pigeon is a step down. Another thing to note is that his ancestors' Zany Schemes were all to try to gain something for themselves: the throne, prestige, money. He just wants to get out of the war alive. He fails.
Bram and Alice: Subverted Trope: There was one episode of this short-lived sitcom which has Bram having the "jerk" who beat him in poker earlier taking Alice out to a jazz concert. After a brief talk between Bram and Alice's roommate, Alice is storming back in and calling the guy the biggest jerk she ever met (or words to that effect).
Walter White's brother-in-law, Hank Schrader, is a DEA agent and a bit of a jerk to Walt (while Walt starts off a simple high-school chemistry teacher, while Hank is far cooler). He is also extremely stubborn and self-confident. On the other hand, he genuinely loves his wife and his nephew, Walter, Jr. (who in turn idolizes Hank) and is shown to care deeply for his family in general - when he finds out about Walt's cancer, he assures Walt that he will look after the others.
Jesse Pinkman in the early seasons of the show. He's crass, impulsive, and a meth dealer on top of it all. The first sign that there was more to him was his affection and protectiveness of his little brother. His love of a children is a constant throughout and the best way to get him into a homicidal rage is by hurting children. As the series went on, the jerk part began fading and the heart of gold became more prominent, with Jesse showing real guilt and self-loathing for the work that he does and the lives that he has hurt, while also feeling trapped in that life.
Cordelia and Faith. With the former she acts like a massive Jerk Ass, however when push came to shove she would help out, specifically in The Dark Age after Buffy issues orders to the Scoobies she slinks over, all smiles, genuinely wanting to help. This was before she got a dose of Character Development on Angel. With Faith she had demonstrated before that she could be a Jerk Ass but genuinely want to help, such as when she scared off Buffy's ex when he was with a new girlfriend. However there was the time when she stole Buffy's body, she had to abandon her opportunity to run off to save a church of innocents. The fact she realized how she had crossed the Moral Event Horizon led to her first becoming a Death Seeker, then a full Heel-Face Turn to being more Good than she ever was before (still Chaotic Good), and a little nicer than even before her Face-Heel Turn, though still an example of Good Is Not Nice.
Carrusel: Pablo Guerra. He may be the class prankster, may get into trouble often, and may inadvertently cross the line at times. But he is not malicious or cruel. In fact, he was the first one to befriend Mario the new boy.
Chuck: Adam Baldwin, who played the above role, does this trope better as Casey. While Chuck's other handler quickly becomes a viable Love Interest, Casey continues to emphasise how little he thinks of Chuck, generally insulting him, not caring about him, and always following orders above all else. But by the end of the second seasons, he has quite a large amount of hidden fondness for both of his partners, even if he would never admit it. He does. He tells General Beckman that Sarah is the "Best partner I ever had". Mind you, he is saving her job at the time....
Community: Jeff Winger is an unapologetic Jerkass, and yet — although he'd loudly complain about it — would do absolutely anything for the people he loves.
Most of the characters could be considered as this:
Britta Perry tends towards being obnoxious, self-righteous and inept, but her heart is in the right place and she'd jump through fire for her friends.
Pierce Hawthorne is a racist, obnoxious, racist, arrogant, racist, insensitive, homophobic asshole and The Friend Nobody Likes within the study group. However, there are glimpses of someone more likable and sympathetic within Pierce, but he's buried very, very deep.
Abed Nadir is often rather insensitive and tends to say what he thinks regardless of how it will affect other people. However, he does care about his friends, and he will never go out of his way to hurt someone.
Shirley can act like a self-righteous dick to people, but she does insist on being kind and is genuinely happy when something "nice" happens to them.
Annie Edison can come off as overly competitive, nagging, and judgmental, but it's mostly a front for her own neuroses, and she's a very nice and caring person underneath it all.
Calder Michaels in Covert Affairs comes off as a careerist asshole who cares about credit and politics of the agency more than people and the truth. In fact, everyone, from Annie and Augie to Joan and Henry, assume he is this way. It takes a lot of convincing to show that he does, in fact, care more about the truth and his operatives than he lets on. Augie's expression when he finds out that Calder did not make the flash drive compromising Henry disappear is priceless, as he was 100% sure that Calder was in Henry's pocket. By the end of Season 4, Calder proves invaluable in stopping Henry, partly by keeping his Jerk Ass mask in front of Henry and claiming to be his supporter. But he's also willing to put his career and life in danger to get to the truth and protect the people who rely on him.
Criminal Minds: David Rossi comes off as this on several occasions. A prime example is in the episode "Penelope", where he's basically a complete jerk to Penelope Garcia - but only because he wants to catch the guy that shot her. He becomes a bit more subdued in this trope as he gets closer to the team, but he still has his moments.
Defying Gravity: Steve Wassenfelder, especially in regard to Paula, both the Jerk and the Heart of Gold parts.
Degrassi: Every antagonist turned protagonist has a period of this. The longest being Holly J's which starts toward the end of Season 7 and ends... around the end of Season 9. But Paige, Spinner, Jay, Alex, Peter, Jonny, Declan, Drew, Owen, and Bianca also had there time as primarily Jerk, minor heart of gold period.
Doc Martin: While the Doc has a habit of being extraordinarily rude to people, it's clear that he does care about their well-being, but is frustrated by the fact that they never follow directions. He also clearly loves his Aunt, Louisa, and even Pauline. This is most obviously expressed in the episode where he and Louisa become engaged, as he tells off Pauline's mum for accusing Pauline of being a criminal when really she just has a gambling addiction, and where he tells Louisa that he can't bear to live without her.
Doctor Who: Most of the incarnations of The Doctor would touch on this trope at some point, but in many ways the Sixth Doctor matches it most of all; for the most part he's a pompous, arrogant, blustering jackass filled with a monumental sense of his own self-importance... who, every so often, does something that reveals him to be more than capable of acts of astonishing compassion and generosity.
Shows up especially in the Big Finish Doctor Who audios and especially with companion Evelyn Smythe, simply because she refuses to let him get away with being a jerk.
Nine had a penchant for being more brash and brazen than his other incarnations thanks to his recent trauma in the Time War and subsequent Survivors Guilt, but ultimately he's still the Doctor.
Adric is sort of a lesser version of this, as he doesn't really develop jerk tendencies until season 19, but he still shows he cares. For instance, at the beginning of "Kinda" when he and Nyssa are discussing her recent fainting spells and he calls her "hopeless in her present state of mind." But when she starts having another attack, he goes over and puts a comforting hand on her shoulder.
The First Doctor started out as a jerk, but he clearly loves his granddaughter Susan. He goes through Character Development.
The Twelfth Doctor is callous and given to disdain and insult everyone (even his companions), yet he's shown to care about people and takes a dim view on those who see others as expendable.
Don't Trust the B---- in Apartment 23: Chloe is this in just the first episode. She's a complete bitch and steals rent money from her roommate, June. She exposes June's cheating fiance by seducing him. June then thanks Chloe saying she probably would have found out it 10 years later and be divorced with 2 kids.
Downton Abbey: Has the Dowager Countess, Violet Crawley. She is extremely stuffy, and imperious and snobby, but has shown on several occasions that she is a good, caring person. A prime example of this is the protectiveness she displays towards her son's second footman, William Mason. Her reason: His mother just died, so if he died, his father would be left alone. When William is mortally wounded in World War One and wants to marry Daisy, the vicar refuses, but she convinces him to do it, and later she counsels Daisy who is feeling guilty about marrying William when she didn't love him as much, telling her that marrying him to keep up his spirits was in fact a loving thing to do.
Due South: Ray Vecchio, who doesn't always make the best first impression, but dearly loves his mother, his sister, the rest of his family and his best friend Fraser, and has demonstrated that he's a caring person at times to others.
Entourage: Ari Gold, a foul-mouthed, ambitious Hollywood agent who loves to berate people's social status, sexual orientation, appearance, age, and just about any weakness he perceives others to have. He actually cares deeply about everyone around him and would go great lengths to help them, proving his loyalty, compassion, and kindness under his Jerkass facade.
Extras: Andy Milman is a variant of this: he is a very grumpy, selfish, self-centered, and sarcastic guy, and he has contempt for people like Derrin who are idiotic, pathetic, or incompetent (in his eyes at least). He does genuinely like and care about Maggie, however, and he truly wants to be a great actor. The world just seems to conspire to make him look like significantly more of an asshole than he actually is, putting him in situations where he accidentally appears racist, homophobic, anti-religious (which he is, but not in an asshole way), intolerant of the mentally handicapped, etc. However, unlike Maggie, who similarly gets into such situations, it's usually at least partly his fault for being an ass.
Family Ties: Alex P. Keaton dreams of reaching the top of the corporate ladder and being rich — and he often acts pompous about his intelligence. His views also sometimes appear sexist and he often appears to hold a certain contempt for people who lack intelligence and/or wealth. However, he has shown many times that he truly is a lovable and compassionate person — and his good buddy is Skippy Handelman.
Farscape: In the later seasons, Dominar Rygel XVI. He was showing some of these traits as far back as Season 1.
Firefly: Jayne Cobb is on the borderline, and definitely leaning toward "Jerk", but shows some nicer moments, such as sending a chunk of his pay to his mom to help take care of his ailing sister, and wearing a truly hideous hat because his mother made it for him.
Jayne actually liked the hat (possibly just because his mother made it, but still). More telling is his reaction to the Mudders in "Jaynestown":
Jayne: You guys had a riot? On account o' me? My very own riot?
The devastation on Jayne's face after one of the Mudders sacrifices himself to save him speaks more about his character than anything else. He also shows genuine loyalty and even affection for his own crew, though he doesn't initially include Simon and River in that group. He's also nice to people who are friendly to him, especially when he has money and is in a good mood.
Jayne: (Gives a Buddhist Monk some money) Buy some shoes.
Monk: The Hero of Canton... He's real!
Mal also falls pretty squarely into this trope- he goes out of his way to be rude, offensive, or outright antagonistic to people, particularly Simon, Book, and especially Inara, but he will not allow any of them to get hurt.
Frasier: The title character, likewise, is a pompous, self-righteous, overbearing and snobby jackass who nevertheless genuinely loves and cares for his family and friends, is devoted to psychiatry and his patients, and is deep down ruled by an inner need to be liked. His brother Niles is similar — less arrogant and self-righteous than Frasier, but even more snooty and viciously sarcastic, who nevertheless demonstrates genuinely decent redeeming qualities similar to those of his brother, and his love for Daphne frequently brings out his sweet side.
Martin is in some ways like this as well, at times to the point of being an inversion; although a lot more down-to-Earth, practical and, on the surface at least, likable than his two sons, he's nevertheless in the early seasons a crabby, bitter and emotionally repressed and distant man whom, it's suggested, has rarely actually made much of an effort to connect to his sons in any meaningful way (although he remains proud of them nevertheless). Whilst Niles and Frasier tend to wear their jerkiness on their sleeves, especially towards Martin, it's frequently established that Martin also has his jerkass side and partial responsibility for his difficult relationship with his sons.
Daphne is kind of a double subversion as a Bitch in Sheep's ClothingWith A Heart Of Gold. She's sweet, polite, and cheerful on the outside; manipulative, hypocritical, hot-tempered, and slightly unbalanced on the inside; and deeply loyal and caring on the very inside.
Even Roz is a bit of this as well. She's a swaggering, loud, snarky, flippant, ball-breaking Village Bicycle; but shows that deep down she does feel vulnerable about her life and relationships, is a romantic at heart, and is very, very protective towards her best friend Frasier. Yeah, this show had a big thing for taking comedy-fodder stereotypes and giving them depth and complexity.
Friends: Phoebe after she Took a Level in Jerkass (she was more of a Nice Girl in early seasons). She does redeem herself in the end when she willingly drives Ross to the airport to catch Rachel, and is genuinely feels bad for Ross when Rachel at first gets back on the plane.
Fringe: Peter Bishop. He could very well be an all-around good guy if not for the fact that his father is what keeps his Jerkass side intact.
Family Feud: Probably the Richard Dawson-hosted version is the most prominent example. Dawson many times has been accused of being downright mean and egotistical to the production staff (particularly producer Howard Felsher), and would cut mean jokes about people he didn't like, particularly about Richard Nixon (a man that, according to one history of the series, Dawson claimed tried to "destroy" democracy). He once refused to participate in a TV Guide feature on game show hosts (because he wanted to be the only host pictured on the cover), and fellow game show hosts – including Monty Hall – had rather unkind words to say about Dawson (his personality, hosting style and so forth) in said feature.
However, Dawson's remarks about obviously dumb answers given by contestants were meant to be taken in jest. He also tried to put the contestant and the game first whenever possible — debating with the judge to rule over "close" answers, allowing more time if they didn't hear the final question in Fast Money, rewarding contestants with lollipops, etc. During the original syndicated series, Dawson gave losing families $250 in consolation just for playing (if they failed to reach that amount). Finally, countless families gave him gifts over the years, so he couldn't have been that bad a guy.
The Price Is Right: Much has been said about Barker's off-screen relationships with the classic Barker's Beauties and other production staff with whom he had fallouts. On-screen, Barker – especially in his last few years on the show – began acting more cantankerous toward particularly dumb contestants, particularly if they were playing the game too slowly or didn't seem to understand a given pricing game despite a clear explanation. However, like Dawson, Barker always tried to put the contestant first and debated with the judge on close answers (almost always deferring to the contestant if he acted as judge himself).
Jeopardy!: Alex Trebek has often been criticized for his thorough enforcement of a game's rules, particularly with this show. This was a point brought up by USA Today writer Jefferson Graham in "The Game Show Book," where Trebek would often snap at contestants who forget to phrase their responses in the form of a question ("Remember to preface your response with 'What is ... ?'"); Trebek has defended his strictness by saying those are the rules and that Standards and Practices will enforce them if he doesn't. Yet, Trebek has shown many times he loves to have fun with the games and, like Barker and Dawson, will always do his best to side with the contestant.
Garo: Saejima Kouga can be a jerk towards people and have nasty anger problems (well that's only because his Berserk Button has been switched on) but the Heart of Gold thing really shows later in the first season, in Makai Senki it's shown with how much he cares about people close to him (especially Kaoru)
General Hospital: Tracy Quartermaine appears to be extremely unpleasant. She is mean-spirited, petty, caustic and was even branded the "Step-monster" by her stepdaughter Lulu. However, underneath all that is someone who cares very much about her family. A nice example of this is when Lulu gave her speech at Luke and Tracy's wedding
Lulu: As I slowly got to know you, I realized how deep you are and how special and how remarkable you are. And how lucky I am the day that you stomped into my life. And I'm very happy that you married my dad, and I'm honoured to call you my stepmother.
Gomer Pyle, U.S.M.C.: Sergeant Carter tries to act as nasty to his troops as possible. After all, it is his job. But Gomer keeps his cheerful attitude and even tells the sergeant how much he likes him, making Carter's job even harder. In one episode, another trooper's baby won't stop crying unless Sergeant Carter is holding the baby. Another episode shows Gomer catching a cold, but due to a mix-up of information from the doctor's office, Carter thinks that Gomer is dying. This causes him to show complete kindness to Gomer.
Gossip Girl: Chuck Bass. He's a jerk, and proud of it, but he loves Blair with all his heart and would do anything for her.
Blair is this too. She's a ruthless and elitist Rich Bitch yet very much a loving friend and girlfriend.
Green Wing: In the first season, Guy is annoying and insensitive, with very few redeemable features. In the second series, he starts to grow fond of Caroline, and even proposes to her. Though still something of a jerk, he clearly does have a soft side.
Grey's Anatomy: Alex. He's gruff, quick-tempered, rude, sleeps around, but he cares deeply for his friends and is an excellent pediatric surgeon because he cares about kids.
Hercules and Xena: Aphrodite started out as a petty, materialistic bitch who cared more about her temples and used mortals' feelings to get what she wanted. Over time, however, the character evolved into one who did care about some mortals (at least the ones devoted to her), built a friendship with Gabrielle and was one of the few gods who refused to join Athena's war against Xena and her daughter Eve.
You can't forget that lovable rogue, Autolycus! He's proven time and time again that despite claiming that his main interest is himself... and riches, he's put his own life on the line to save his friends on multiple occasions. Gabrielle even says that he has a heart of gold after he defends her bad plan to Xena even though he himself had been criticizing her for it shortly before the warrior princess' arrival.
Heroes: Nathan Petrelli, when running for congressman, is a good example of this trope. He cultivates some bad connections and habits but genuinely loves his family and does what he can to help them. Given that Nathan Petrelli's worst connections of all are within his own family, this seems like a subversion of the trope or an inversion or something. If left to his own devices, Nathan would be a great guy, but throw in all the bad influences from his environment and....
Highlander: Methos has stayed alive for centuries by not giving a shit about other people and only looking out for himself. But every few hundred years he slips up and forms attachments to people whom he will begrudgingly risk his life to protect. Afterward he laments his inability to mind his own business.
Horatio Hornblower: Hornblower himself, in the later films, due to Character Development. Most notably in his dealings with his wife Maria. This is, of course, in line with his characterization in the books, where he became a fairly cold and calculating character, who had great difficulty in relating to other people. Towards the end of "Duty", when Hornblower follows his orders to force Betsy to return to America without her husband, they have a discussion concerning how one must weigh their duty against their sense of humanity. When Hornblower stands by his orders, Betsy sharply tells him that she pities his wife. He replies that he pities her too, but that he is the man she married. He is all too aware of how unfair he is to poor Maria, who has no idea how one-sided the love in their relationship is. At least a little Values Dissonance is at play here, given that one cannot judge an early 19th century aristocrat's marriage by 20th or 21st century standards.
House: Dr. Gregory House threatens to get into this during his Pet the Dog moments, particularly when he was diagnosed with cancer and still insisted on focusing on the patient. As always, it turned out he was just a Jerk With The Heart Of An Even Bigger Jerk than we had assumed — he faked having cancer so he could get his hands on the prescription drugs, although to be fair, his team only "found out" he was sick by snooping around behind his back.
As often as not it's played straight with House. Case in point: he hires Foreman's ex-con brother over Foreman's wishes and delights in setting the two against each other. This ultimately leads to him "going too far", which leads to the two brothers uniting against him, just as he planned.
Doctor Chase is a lesser example, he is a self-serving jerk and semi-antagonist for the first season but proves his loyalty by season 3. It's also assumed by everyone that he will break Cameron's heart when they begin their friends with benefits relationship, when in fact she's the one who breaks his.
House of Anubis: Jerome Clarke. Greedy and manipulative, with a love of pranking others, and has worked for the Big Bad at least once. But when the chips are down, he has proven his loyalty to the other students time and time again, and where Mara and Joy are concerned, has proven to be a very deep and sensitive guy under his uncaring shell; The best examples, however, are whenever he was with his family in the second season.
How I Met Your Mother: Barney is usually a pretty good example, although he may be more of a Jerkass Façade. Though he frequently comes across as selfish and narcissistic, he's willing to go to extraordinary lengths for his friends and family.
For example, spontaneously flying to San Francisco, convincing Lily that she and Marshall need to get back together, and paying her airfare home. He also pays for their honeymoon.
There's a catch though - this is only to his friends and family. To other people, especially his one night stands, he's just a plain Jerk Ass.
Robin likewise is extremely tactless, insensitive, sarcastic, blunt, emotionally stunted, and prone to ruthlessly mocking everyone around her, but cares deeply for her friends and has a secret soft side that she usually keeps hidden.
Interny: Similar to House and Cox, Andrey Bykov in this Russian medical sitcom is a sarcastic and rude head of the therapy department. He has four interns under his charge, and he constantly gives them degrading assignments. His most preferred method of punishment is to leave them on-call at night, even if it's not their turn. His best friend is the head of the venerology department, whom he also constantly insults. He occasionally sleeps with the attractive hospital administrator, whom, you guessed it, he also insults. However, his desire is to make good doctors out of those interns. Bonus points for being played by a priest.
Kamen Rider Ryuki: Ren Akiyama, Kamen Rider Knight comes off as a cold loner, who seldom speaks and doesn't get along with people much. Later, he turns out to be a gentle person, who genuinely loves his girlfriend and is determined to save her. Ren also has an unspoken affection for Yui and his rider sidekick Kido.
Las Vegas: Sam Marquez had enough genuinely nice and selfless moments, where she did something kind even though there was nothing in it for her, to keep her from being a pure Jerkass or Ice Queen. It's also gradually revealed that she had a rough childhood and secretly values her friendships with her colleagues, making her bitchy public personality just a façade to seem tough and unscrupulous. She ends up receiving the most Character Development of anyone on the show.
Law & Order: Special Victims Unit: Elliot Stabler. He can be quite an ass at times, but when the chips are down, he'll do whatever he can to come through for his friends and the case.
Arguments could also be made for the original Law & Order's Jack McCoy and Mike Cutter, who can both appear unsympathetic, over-zealous, and cut-throat at times, but their intentions are almost always noble.
Life With Derek: Derek Venturi can be a complete ass most of the time, but there have been a number of occasions where his "heart of gold" has shone through. Especially around his little sister, Marti.
LOST: Sawyer starts as a Jerkass and evolves into this.
Married with Children: While occasionally played straight, one episode makes this a Subverted Trope. Al enters himself in an athletic competition for senior citizens (despite not being a senior citizen himself) and his last remaining competitor tells him how much it would mean to him to win this. Al considers for some time to let him win but in the last seconds decide to take the cup for himself. Then we see Al on first place on the podium and the narrator telling us that if we really expected anything else, we probably haven't paid attention all these years. All the while the old man on second place is sobbing.
Major Charles Emerson Winchester, making him more than just a Suspiciously Similar Substitute for Maj. Burns. Self-centered, elitist and, despite being rich already, often greedy and self-promoting, he is saved from pure Jerkassdom by a strong core of personal integrity and occasional moments of genuine kindness and sympathy. Plus he's also actually just about as good as he thinks he is in the operating room. The most triumphant example of this occurs during one of the Christmas episodes. When the camp decides to throw a Christmas party for a group of Korean orphans, Winchester's contribution to the pot luck is a measly tin of oysters. Of course the rest of the camp calls him out on his stinginess. What they don't know is that he also secretly gave to the orphanage a large amount of fine chocolate bars. However once the bars show up on the black market, he comes close to beating up the orphanage director until the man explains he sold the chocolate to provide a years' worth of staple foods. This mollifies and humbles Winchester.
In the early years, the main characters Hawkeye and Trapper John were like this— they're cocky, insubordinate pranksters and hellraisers who irritate others constantly, and two of the best and most caring doctors you could hope for. And most of their pranks were directed toward the mostly unlikeable Frank Burns and Margaret Houlihan, anyway. In the novels and the film, the "jerk" aspects of Hawkeye and Trapper are far more pronounced, fitting this trope much better.
Merlin: Arthur. Arrogant and self-centered yes, but with a genuine sense of justice and near unshakeable loyalty to his friends, his people and his king. In fact he might not be a jerk at all, if it wasn't for this sense of duty towards his father, who is a trueJerkass.
The Middle: Axl. Underneath the Bratty Teenage Son exterior, he's twice helped his sister out in ways she'd never be aware of, despite the many times he's called her a dork and similar things to her face (although once he did call her a "dork optimist" as a compliment. He's also been shown as very willing to help out Brick, his younger brother, with schoolwork. In "Halloween II", Axl persuaded his friends to abandon their original plan to steal candy when they encountered some little kids who'd had their candy stolen, and instead they got the kids their candy back. When a college football recruiter visited, we saw that he could be very polite and charming.
Misfits: Nathan Young is a pretty extreme example of this. He is indisputably selfish, immature, insensitive, petulant and obnoxious, and while his Jerkass personality may be a facade to some extent, the fact remains that he often goes out of his way to upset others and seems pretty oblivious to his companions' dislike of him. However, as his Character Development continues, his own vulnerability is made clearly apparent, and he does (occasionally) start to show concern for other people and even expresses remorse for some of the things he's done. Plus, his surprisingly heroic actions during the series finale prove beyond a doubt that there is a half-decent person in there somewhere, no matter how well he hides it most of the time.
Mortal Kombat: Conquest: Siro may act like an asshole most of the time, but he is always loyal and protective for those he cares about.
NCIS: Los Angeles: Deeks in the start of the 5th season, which it ends on a somewhat happy note.
New Girl: Nick may qualify. He's incredibly cynical and likes to watch his friends insanity unfold around him but doesn't really do anything Jerkish. He seems to consider Jess one of his closest friends and appears to really like her quirks. Overall it is made quite clear throughout the series that Nick is a really good guy who has simply endured a lot of misfortune and unhappiness.
NewsRadio: Bill McNeal is a subversion of this. He's always on the verge of doing the right thing, but always falls back on his selfishness.
Although even he rises to the occasion from time to time:
Bill: Jimmy, Dave is quite simply the best news director I have ever worked with. Catherine: But? Bill: What? No, I really mean it. Catherine: Well. Bill McNeal shows a little compassion and sincerity. Remarkable. Bill: Those dimensions are there. They're just unexplored.
The Newsroom: Will McAvoy is an aggressive, headstrong news anchor who frequently screams and swears at his staff, is very forgetful of their names, and has the capabilities to betray their respect & trust for the sake of ratings (though he refuses to), but he's very loyal and trusting to said staff, and even paid the ransom of a captured foreign correspondent when the parent company of ACN refused to pay for the correspondent's release. Then there was the time he anonymously paid for the transport costs for a man who couldn't drive to work because he was outed by a newspaper as an illegal immigrant.
Night Court: Dan Fielding is one, despite any protests he may make to the contrary. Despite being greedy, power-hungry and sex-crazed, Dan is an honest lawyer who repeatedly sacrifices chances for advancement because of his ethics and risks his life and dignity to help his friends.
One great example of this is how he gave up a partnership in a very high-profile law firm despite promises of a private office and an attractive female boss who wanted him after he found out that he was being hired for his reputation as a good lover — not because of his record as Assistant D.A. Of course Dan slept with the woman offering him the job first THEN quit, excitedly telling a confused janitor as he left her office "You can have your principles and STILL get lucky!"
Another shining example was when he found some way to coerce Christine into bed (he saved her life and played the "you owe me" card) — but he couldn't do it to an unwilling woman that he genuinely cared about. She's as stunned as he is, and basically cites this trope verbatim... only to have him point out that this is only going to make him chase her more and that someday, somehow, he will wear her resistance down.
Another example of him defending Christine came when she was going to be sweet-talked into bed by a guy who was part of a rich and powerful club who was using the conquest as part of a "sexual scavenger hunt." Dan was a prospective member of the club, but willingly threw his membership away to keep Christine from being used as a plaything.
Another sterling example occurred in the episode where Roz is first diagnosed with diabetes. Due to inexperience managing the disease, she ends up in insulin shock, standing on the edge of the roof and crying about how she can never have another chocolate ice cream cone like she shared with her dead father. Dan poses as her father and distracts her and keeps her still long enough to give her a shot of glucose to bring her out of insulin shock...after she punched him in the face several times while he was first trying to talk her down.
A really incompetent and sloppy attorney fingers Dan as the father of a boy who's mother he never met. In the end, when the mother comes to confront the recalcitrant Dan, it turns out he was right about not being the father, as the father is someone named STAN Fielding. At the end of the episode, Dan is shown giving the boy some money to pass on to his mother and apparently embarking on a big-brother type relationship with the boy.
Dan did TRY to be a heartless, thieving jerk and loot the funds from the Phil Foundation. In the end, he just didn't have what it takes to loot a charity and the guilt drove him insane until he confessed publicly.
Noah's Arc: Despite plenty of Jerkass behavior (especially early on), Ricky shows more and more of a heart of gold as the series progresses. After Noah's gay bashing, Ricky truly starts to show his kindness more visibly.
No Reservations: Anthony Bourdain. On the outside he may seem like a Jerkass, but really, he's all right and cares about his crew and the people he visits in his travels.
The O.C.: Seth Cohen may fit this. He may be self-absorbed and slightly petty, but he loves Summer more than anything, and most of his selfless and sweet moments occur when he's with her, or when the situation involves her. When he wasn't accepted to his preferred university, and she refused to go without him, he broke up with her and told her didn't love her any more just so she would go. And he clearly did still love her. And how can we forget all the times where he looked after her and his mother while they were drunk?
And then there's Luke. He started out as a complete Jerkass, and eventually became a pretty good friend to the main cast.
Summer. She started out as a spoiled, rude Alpha Bitch, but, like Luke, she evolved into a much more likable, sympathetic character.
And finally Taylor. Initially she was annoying, conniving, self-serving, manipulative and Summer's Arch-Enemy. Eventually she had a Heel-Face Turn and became a good friend to Summer and the other main characters (as well as Ryan's Love Interest).
If you think about it, almost everyone in this show could be considered a Jerk with a Heart of Gold at one point in the series.
Only Fools and Horses: Del Boy is self-centered, boorish, uneducated, a social climber (and a totally incompetent one at that) and a petty criminal, but he does genuinely care for the people he loves and has been shown to be quite sensitive at times.
The Paper Chase: Professor Kingsfield. For instance, in one episode he apparently blows off both Logan's desperate phone call from jail and Hart's attempt to hand in his extra credit work. However, Kingsfield actually intervenes behind the scenes to get Logan released and turns over an entire class period for Hart to present the research he's done.
Parks and Recreation: A similarly tailored example: Ron Swanson is a gruff, bitter misanthropist who hates his ex-wives, liberals, and the government, but when it comes down to it he's always there to help his coworkers and dispense sage wisdom. Tom to a lesser extent.
Pit Boss: Shorty Rossi. Despite his rougher aspects, he is a genuinely nice guy underneath who tries to do right by people and the dogs.
Power Rangers Dino Thunder: Conner is one of these, which was a very interesting example considering he was the Red Ranger. It's actually a quick upgrade from the Jerk Jock that he is in the premiere. Still, this made for some funky team dynamics during the time it took for the group to begin to actually trust each other, since his teammates were a male geek and a female loner musician.
Dillon of Power Rangers RPM strays into this trope, but there tends to be more emphasis on the "heart" and less on the "jerk". Most notably is in the second episode when he and Ziggy are in prison. Ziggy as it turns out, is something of a prison bitch and Dillon makes it clear that he has no interest in looking out for him. But after he overhears another prisoner taunting Ziggy for being an outcast, Dillon goes out of his way to defend him. And it is awesome.
Dillon seems to invoke this trope as a defense mechanism more so than actually being it (he's probably closer to Good Is Not Nice). In the third episode, "Rain", when the three core Rangers are trying to get him to join the team for good, he says, "I'm not that kind of person", "that kind of person" being the noble heroes he imagines Scott, Flynn and Summer as, even though most of his actions that have been seen up to that point indicate that he's just as much of a "good guy" as they are. To put an even finer point on it, he joins the Rangers on one condition: that Ziggy be released from prison.
As much as Bulk and Skull from Mighty Morphin' Power Rangers are jerks and bullies, they do have soft spots, showcasing genuine care for a disgusting pig, trying to save a runaway stroller, and when stuck in a dreamscape, they dream of being heroes. They also saved the Rangers' lives during one episode where the Monster of the Week gave them Laser-Guided Amnesia. Maybe not full gold, but some lower value precious metal, made shinier as the show went on.
The ultimate in-series example is Eric, Power Rangers Time Force's Sixth Ranger. Having grown up poor, he's bitterly jealous of Wes's privileged upbringing, and much of his motivation after becoming the Quantum Ranger is to finally have as much (if not more) power than Wes does, which he gets by becoming the leader of the Silver Guardians, a private security force created by Wes's father. (This is all amplified by how much of a genuinely good guy Wes is.) Yet one of his best friends is a young girl who's a neighbor of his at the trailer park he lives in, and he also keeps birds as pets. As the series goes on, he begins to warm up to the Time Force team, even thwarting one of Wes's father's plans that would have inadvertently helped the Big Bad. In the finale, he jumps in front of a mook - unmorphed - and takes a shot meant for Wes and his father. He survives and co-leads the Silver Guardians with Wes at the end.
Obligatory Super Sentai note: Eric was virtually a carbon copy of his Sentai counterpart Naoto, birds and all. The only real difference between them is Naoto dies at the end. Even weirder, Naoto even looks like a Japanese version of Eric.
And it seems almost impossible to mention Super Sentai without mentioning Gai Yuki from Jetman.
Pushing Daisies: Emerson Cod is grumpy, snarky and is always annoyed at having to listen to Ned and Chuck's problems...but he always does listen to them, and often provides helpful advice. Lily as well. A gun-toting, foul-mouthed, cantankerous old lady who loves her sister more than anything in the world.
Queer as Folk: Brian Kinney on the American version was a huge jerk to every character on the show at one time or another, but always ended up doing the right thing or saving the day for everyone.
Revolution: Miles Matheson started out as a cynical, unscrupulous jerkass. However, as of episode 6, he takes steps forward in becoming this. However, Charlie has had to make sure he didn't do something really terrible, like in episode 16.
Scrubs: Dr. Cox and his wife Jordan are examples. They are both exuberantly acerbic and sarcastic especially to each other, but deep down are caring (albeit emotionally repressed) and loving, although they only express this to each other and their son, Jack — and, in the case of Cox, very very occasionally, to J.D.
Dr. Kelso is a variant; he actually is a Jerk, and an unapologetically sadistic and mean-spirited one at that, but occasionally reveals himself to be ultimately more caring and decent than he cares to admit, and and at least partially acts the part of a ruthless, uncaring and egotistical bastard in order to keep the hospital running efficiently.
He also knows that when he does something really reprehensible, Dr. Cox will always go behind his back and fix it. In one episode, where Dr. Cox is considering leaving, he acknowledges that he depends on Cox to be the foil for him.
This seems to be common on Scrubs, as it's also sometimes implied that the Janitor is actually quite fond of J.D., and his cruel bullying is just his sociopathic and socially maladjusted way of showing it.
The Finale shot this down by having him say that the "Did you put a penny in the door?" bit was a Secret Test of Character which JD failed, and that's why the Janitor tortures him. Although he does suggest that if J.D had just told the truth they could have been friends...
SCTV: Johnny LaRue (played by John Candy). Johnny LaRue is a rather hefty millionaire celebrity who's a bit of a jerk at times but is often a sweet guy too. He's also one of the resident gentle giants on the show.
Shark: At the start of the show, Sebastian Stark is almost a complete Jerkass, but begins to show a softer side as the series progresses thanks to his daughter, his loyalty to his team and his new-found desire for redemption.
Stargate Atlantis: Of course this trope just screams for Dr. Rodney McKay, who's an egoistical, self-centered, selfish and cowardly Jerkass, but brave, selfless and understanding when he feels like it. In particular, there's one moment that pretty much sums him up in a nutshell. Upon finding out that, in an alternate universe, he spent his last moments unflinchingly trying to save others, he brags about it.
Tom Paris. In fact, the going-away speech given by Neelix in "Investigations" sums up this trope admirably.
"Good morning, Voyager. I want to tell you about a friend of mine. I first met this man almost a year ago and, to tell you the truth, I didn't like him much. He seemed a little too cocky, a little too sure of himself. A lot of people had questions about him. He'd proven he'd pretty much sell himself out to the highest bidder, go wherever the wind blew him so people wondered, could you trust this person when things got tough? Would he stand side by side with you or would he let you down when you needed him most? But the fact of the matter is he proved himself right from the beginning. I wouldn't be alive right now if it weren't for him and the same goes for many of you. It took me a while to realize it. Like a lot of people, I was too caught up in first impressions to see the truth that was right in front of me. I overlooked his bravery because I was focusing on his brashness. I ignored his courage because I saw it as arrogance and I resented his friendliness because I mistook it for licentiousness. So while this man was giving us his best every minute of every day I was busy judging him. And now he's leaving. I'm proud to say that in spite of my narrow-mindedness Thomas Eugene Paris became my friend. I'm going to miss him. No more laughs over a game of pool. No more sitting up into the wee hours swapping stories. No more complaints about my cooking. (chuckling) Goodbye, Tom. I think I speak for more of us than you might imagine when I say you're going to leave an empty space when you go. I hope you find what you're looking for."
The Doctor fits this as well. He's full of himself and his bedside manner sucks (at least initially), but he loves the crew. At one point he's willing to get reset (which would cost him all his memories and a lot of his personality) rather than risk giving inadequate medical care to them.
Suits: Harvey. While he puts a lot of effort into playing the Amoral Attorney professionally and being a Jerkass for the fun of it, he genuinely cares about Mike and Donna to a familial degree. He is very loyal to his friends in general.
Supernatural: This show is full of these but Dean especially can have a nasty temper and is a cocky, self-righteous, judgmental, always-wisecracking Jerkass manwhore with such low self-esteem he thought he deserved to go to hell, an almost obsessive devotion to his family (and he really wanted them back together again, which was never going to happen), a desperate need to be liked, an unwillingness to actually stand up for himself (when it came to Missouri, John and sometimes Sam), has shown an honest willingness to sacrifice himself and his own happiness for perfect strangers, and all that wisecracking is just to "mask all that nasty pain". Not forgetting that he's also the show's favorite bitch, so you've got to give him some sympathy.
Sam really does deserve to be here as well. He's self-absorbed, doesn't seem to think much of Dean, can be incredibly cruel at times ("You were four when Mom died. How could you possibly know how I feel?", anyone?) and is prone to self-pity by the bucket-load. He uses the whole "Captain Empathy" thing as an act at least half the time, he's incredibly violent when he fights and he knows just how to twist Dean around his little finger. But he tries a hell of a lot harder to make Dean feel better than John ever did, he falls apart trying to save Dean in Season Three, he's using his demonic powers for good, he really did try to make it up to his father after "In My Time Of Dying" by focusing on the hunt and much of the bitchiness is leaning towards the affectionate Deadpan Snarker style and not the unsympathetic Jerkass type. It's also hinted that his violent streak may not be quite natural in origin.
Bobby, anyone? As much as he may snap at the boys, and he may not be very friendly to Castiel at times, it's obvious that behind that gruff exterior, he adores Sam and Dean. Hell, he treats them better than their own father did, and tells them when they're in the wrong—same with Castiel.
Gabriel/the Trickster. He enjoys tormenting people, puts the Winchesters through hell, 'teaches' people lessons, often killing them in the process, but also sides with humans when it matters and goes up against Lucifer with saddening consequences.
Taxi: Louie DePalma. He could be the meanest cab dispatcher in New York City but on specific occasions he would help his cabbies. Except for John and Bobby, with Louie getting in Jerk with a Heart of Jerk territory with the latter.
Teen Wolf: Derek. He may seem like a rival and is a bit of jerk to Scott and particularly Stiles, but he seems to genuinely care for his new BROTHER, Scott and even his sometime-sidekick Stiles. For example, he places himself at serious risk to rather unsuccessfully provide cover for Stiles to escape the Kanima, as well as rescuing Scott from being killed by Victoria Argent.
Jackson flipflops between this and Jerk Ass. He genuinely seems to like Allison, and has a few tender moments with Lydia, but mostly he's a jerk.
Thunderstone has Sundance, the oldest of the Nomads. He’s slow to trust and doesn’t like strangers, so he drives them away, no matter what his friends think of the idea. When Arushka starts paying attention to Noah, he gets jealous and as a result mistreats Noah long after the others have accepted him. And, due to being very much a loner, he sits and sleeps as far away from the others as he can and occasionally disappears for days at a time. However, he is loyal, strong, brave, fiercely protective of the people he loves, and once he warms up to you he’s as solid and reliable a friend and protector as you could ever hope to have.
Tin Man: Cain starts as this, but the other three wear him down until he remembers what a good guy he really is, and that (pardon the Wicked reference), good deeds don't necessarily go unpunished. Oddly enough, it's a Heroic Sacrifice into a frozen lake that did the best job of thawing him out.
Top Chef: Stefan from season 5. A very heavy competitor, he comes off as an overconfident ass (which he is, honestly). However, he does have friendships with the other contestants (outside of competition of course) and he tried to comfort Carla when she started to cry during the final judges' session.
Top Gear: Jeremy Clarkson. He's loud, he's smug, he's brash, and he's insufferable... but when his co-presenter Richard Hammond was critically injured in an accident, Clarkson was at his bedside within hours. He also delayed the start of the new season for several months to give Hammond time to recover, and welcomed him back to the show in a lavish spectacle ending with a hug that bordered on Aww, Look! They Really Do Love Each Other.
Twin Peaks: Agent Albert Rosenfield consistently acts as a jerk, insults the locals almost every chance he gets and makes frequent cracks about the rusticness of the place, but later reveals another side to himself:
"You listen to me. While I will admit to a certain cynicism, the fact is that I am a naysayer and hatchet-man in the fight against violence. I pride myself in taking a punch and I'll gladly take another because I choose to live my life in the company of Gandhi and King. My concerns are global. I reject absolutely: revenge, aggression and retaliation. The foundation of such a method...is love. I love you, Sheriff Truman."
The Vampire Diaries: Damon is violent, reckless and impulsive but he really loves Elena and he's extremely protective of her and the ones he cares about (including his brother Stefan).
Veronica Mars: Logan Echolls. Described in his first appearance as a psychotic jackass, but god help you if you hurt someone he cares about.
Victorious: Jade West. While aggressive and abusive towards most (even her boyfriend), she does show signs of caring about others. The episode "Wok Star" is a very good representation of how much she has changed compared to some of her earlier deeds.
The Walking Dead: Has Daryl Dixon, who has no problem saying someone is stupid, but who also shares his stash of medicine and comforts a mother with a missing child. In the Season 2 opener he saves T-Dog's life. His brother Merle, on the other hand, is undiluted jerk.
The West Wing: Leo is this, but he should be considered more pure gold with a crust of jerk rather than a jerk with a heart of gold, especially as he doesn't really attempt a Hidden Heart of Gold. Toby fits this trope more accurately — he acts like an asshole, but cares deeply about his friends, is fiercely loyal to the President, and has very deep compassion for people, as shown by the pains he took and emotions he tried to suppress when trying to arrange a military funeral for a homeless veteran. And Toby's heart of gold gets a quick glimpse whenever he really shows the depth of his friendship with CJ (such as at the end of "The Women of Qumar") or his pride in Sam, who he usually yells at all the time.
Wizards of Waverly Place: Alex. Yes, she's selfish and as close to an out and out anarchist as you're ever going to find in a Disney Channel series but she does genuinely care about her friends and family and in the end always help them, even if most of the time what she's helping them out of is something she caused.
WKRP in Cincinnati: Herb Tarlek. Smarmy. A wannabe ladies-man who hits on pretty much anything with a uterus. Always looks out for himself first and is perfectly willing to lie, cheat, and steal to get ahead at work. A brown-noser and butt-kisser of the first water. Dresses in awful polyester suits. Will not put up with corrupt clients, and woe betide you should you ever threaten the safety of anyone at the station in his hearing.
Wonderfalls: Jaye Tyler. She's lazy, whiny and frequently mean-spirited, but she loves her family and is, in her own words, "very susceptible to guilt".
The Worst Witch: The original books hinted at this with Miss Hardbroom once or twice but the TV series confirms it. While she comes across as a strict Sadist Teacher, she's shown to genuinely care for the girls and the welfare of the school.