Reggie Mantle of the Archie Comics. Oh, he's a self-centered ass but most of his jerkassery is devoted to playing pranks on his friends. In fact, a lot of people have actually pointed out that Archie is a bigger jerk for playing two girls off of each other for their attention, all the while dating anything else that moves. Reggie gets around too, but he's at least honest about it and sincerely loves Veronica over any other woman. Also, when the chips are down, he's shown to sincerely love his friends and go to ridiculous lengths for them. Most of the time. One comic even implies him to wear a Jerkass Façade for whatever reason. He ends up going to great lengths to help Dilton get the woman he loves, and Reggie only asks that his actions be kept a secret in return. He has a reputation as an ass to maintain, after all.
Even in his darkest iterations, Batman does what he does so that one day, there'll never be another little boy forced to watch his parents get killed in the street.
Also, Damian Wayne, Batman's son. In Batman #666, as a Future Bad Ass, he is shown having a pet cat he named Alfred. And in canon, he was visibly disgusted and threw up when he saw hundreds of dead bodies of children. Also from canon, he has been visiting Hush (who had surgery to make him look like Bruce Wayne), who was imprisoned in the Wayne Tower, and playing chess with him. Hush suspects that he does this because Damian is grieving for his father and it's a way for him to spend some time with his father.
Jason Todd, despite the things he's done and the murders he's committed, takes in Sasha, a young girl whose face was mutilated by villain Professor Pyg. When she feared that the mask that Pyg had stuck to her face would make it that no doctor could fix it, he assured her that it wouldn't make her any less special. In Red Hood and the Outlawsit's shown that he deeply cares for the All-Caste, considering them his family and hesitating when confronted with their zombie forms, and saved a village.
Poison Ivy as well. Despite being a fanatical ecoterrorist who gets entertainment out of throwing living people to giant flesh eating plants, she deeply cares about her friend Harley Quinn, and has been a jealously protective and loving Mama Bear to the stray children who fell under her care while Gotham City was ravaged by an earthquake.
Calvin of Calvin and Hobbes fame. His heart is well hidden, but Hobbes being damaged or an injured animal can bring it out. He can also get genuinely remorseful if one of his pranks goes too far.
The Sandman is notoriously insensitive, vindictive and self-centered, and his treatment of former lovers can be downright appaling. But after being imprisoned, he is more than willing to make amends (at least whenever someone calls him out for his cruelties).
Desire, for all its faults, has at least one pet the dog moment in Brief Lives.
Modern versions of Supergirl tend to put an emphasis on her being a teenager who has seen her family dying and her home exploding before being trapped in a strange, -comparatively speaking- primitive world and gifted with powers beyond understanding. So, she's moody, snappy, inmature, rude and short-tempered for a while until she outgrows her loneliness and anger management issues. However, even at her worst she's a good girl deep-down who tries to help people and doesn't want anybody to get hurt.
In the Red Daughter Of Krypton storyline her anger was out-of-control and she was abrasive and often plainly rude. Even so, she tried to be considerate to others, apologized when she screwed something up and chided one of her teammates for not being tactful enough.
Elseworlds Finest Supergirl And Batgirl: It's well-hidden but Barbara Gordon has one. Although she is rude, rules Gotham like a dictator and spends a good while complaining and ranting about metahumans, she doesn't want Kara to kill Lex Luthor -even though she also hates Luthor!- because Supergirl is "a symbol of hope, not revenge".
The New 52 version of Billy Batson is pretty much this, though the 'heart of gold' part is buried underneath a lot of cynicism. It's something of a Base Breaker for fans use to seeing him as The Cape.
Deadpool is often portrayed as this. Even with his rampant insanity, the guy is shown to ultimately mean well and he frequently tries to improve himself. When he ended up in X-Force, he quickly proved to be the most moral member of the team who called out the rest of the team whenever they did something that crossed the line. In fact, it's increasingly strongly suggested that Deadpool acts like a jerk towards others simply because he's afraid of being rejected.
Flash Forward, a.k.a. "Negative Man" from the Doom Patrol. An irreverent smartass who never has a nice thing to say about anyone, he has a soft spot for introverted teammate Ava and often seems like the only person who cares about her, and vice versa.
Although the original and current versions were straight-up Deadpan Snarker.
Robotman, also from the Doom Patrol (though he doesn't technically have a heart: or if he does, it's made of some other metal).
The snarky outcast drow rogue Downer, from the comics Downer: Wandering Monster and Downer: Fool's Errand by Kyle Stanley Hunter (formerly published in DUNGEON Magazine). A down on his luck "proven loser" who survives by his wit, quick tongue, quick blade and quick reflexes (and mainly by running the hell away when outnumbered, unless he's sufficiently pissed off that he decides to indulge his inner Badass and take on a whole bunch of enemies by himself). Although he considers himself an "evil bastard" who puts his own survival first and claims he's "always prepared to be screwed over by his friends", Downer has demonstrated amazing loyalty to friends and guild mates on several occasions, and he always pays back his debts. Downer's brother Aristide claims Downer is a "jerk", but then, Aristide is more of a typical drow (read: selfish and cruel) and his viewpoint is questionable.
Hunter Hastings (protagonist of independent comic Druid City) falls into this trope for much of the planned series. While his ulterior motives are not altruistic, his actions end up benefiting his community.
Ocelatina has kidnapped the main character a few times and exploited her for monetary gain even more times... and she's also the title character's biggest cheerleader, telling everyone who'll listen that Empowered is an awesome superhero.
For that matter there's his brother-in-law Johnny Storm, who can more often than not be a cocky, immature jackass. But he always stands by his friends and loved ones and will give his all fighting for the greater good.
Doctor Doom loves pushing people around and launching attacks against his enemies (namely everybody who's not him) but has warmth for his citizenry particularly the children of Latveria. In a truly shocking moment, he forgave past grudges and aided the Invisible Woman with her recent birth, saving both Sue and her baby from certain death. As such, the daughter, Valeria, is held as an endeared one under his personal protection and allowed unrestricted audience, while the child returns his affection and refers to him informally as Uncle Doom. Awwwwww. (Warning: This is most definitely a Depending on the Writer quality.)
While Bucky of Get Fuzzy is mostly a self-centered Jerk Ass, he's been shown to have shades of this on at least 2 occasions.
In a relatively early arc, when Satchel's arm is badly hurt while chasing a bike, Bucky shows an unusual (for him) amount of care and concern, such as being the one to first inform Rob of the accident and clearly being close to panicking while doing so. Near the end of the arc, Satchel realizes that he lost his beloved wristwatch in the accident, and Rob muses on how it's likely impossible to find it now. Cue a scene of Buckey fishing the watch out of a drainage ditch, out of his own volition.
In a later arc, in the wake of 9/11, Rob and Satchel decide to donate blood. The last strip of the arc is a single panel showing Bucky setting up a bunch of signs congratulating them on their blood donations and calling them heroes, and even prepared a batch of cookies for them.
Green Lantern Guy Gardner. Rowdy, egotistical, self-centered, boisterous, loudmouthed, short on impulse control and long on bravado. However, his side of the Slap-Slap-Kiss relationship between him and teammate Ice is genuinely tender and sensitive, a fact that Ice's friend Fire flat out refuses to believe. Additionally, originally he consciously put on his tough guy facade to cope with being The Unfavorite with an overachieving big brother.
And underneath his bad attitude is a true hero, a man willing to fight and die to protect the universe from harm and deemed best suited to lead the GL Corps as the #1 Lantern.
In his early, pre-Green Lantern days he was a kindergarten teacher. Hal had to save him when he hurt himself rescuing a busload of his students he was taking on a field trip.
The bus rescue happened at the beginning of the issue that introduced John Stewart in 1971, the Jerk Ass persona came about later with the Crisis on Infinite Earths in 1985. It was apparently attributed to brain damage caused by his many misfortunes in the previous decade or so, starting with the injury he suffered at the aforementioned bus rescue when the bus fell on him and culminating with a few years in a coma before the Guardians revived him.
John Stewart was a bit of a jerk as an Angry Black Man in his first story. He was belligerent enough for Hal Jordan to question the Guardians' judgement about having him recruited as his new backup. However, Stewart quickly proves himself and Jordan happily concedes at the end of the story that while Stewart's outspoken style might be off-putting, he's still an excellent recruit.
Constantine is generally only nice when it suits him, but seems to have a soft spot when it comes to spirits with a sob story or keeping the world from getting destroyed.
Jack Horner from the Fables series, is written as this sociopathic jerk who is ignorant of the feelings of others. A lot of fans and critics generally hated him, to the point that series editors just casually keep him in the series because he was a Creator's Pet or The Scrappy. Still, he generated just enough fanbase, not just to keep him in the series, but also to have his own spin-off comic. His jerkiness also has its roots: he's the literal personification of every fictional pranksters and tricksters named Jack, and so he couldn't help being an asshole most of the time. And while he does act like this most of the time, what makes him unique is that it always surprise (and admires) readers everytime he does something selfless.
Tony Starkis this trope IN A CAVE! WITH A BOX OF SCRAPS!!! This applies to both his comics incarnation as well as how he's treated in films. Notably, he only really developed the heart of gold after the accident that made him Iron Man; before that, it was in there somewhere, but not so you'd notice.
Numerous examples from Knights of the Dinner Table, but the most obvious one is Brian. He's a selfish, manipulative jerk, no denying it, but he has showed some genuine kindess over the years, and has gotten perhaps more Pet the Dog moments than any other character.
Ignatz Mouse from Krazy Kat—he may constantly throw bricks at the title character's head, but he's been shown to genuinely care about his Friendly Enemy, and he even does the occasional good deed.
Lois Lane. She's gruff, hard-nosed, sharp-tongued, quick-tempered, bossy, rude, and more than a little bullying; but she's deeply compassionate, has unshakable integrity, is fiercely loyal to her friends and husband, and loves her job because it allows her to help people and fight for truth, justice, and the American Way. And kind, laid-back Clark Kent's attraction to her has strong (though gender-flipped) All Girls Want Bad Boys vibes.
Namor is at best, a gigantic asshole. But he truly does care for his friends, such as Bucky Barnes and Steve Rogers, and will do what i necessary to protect his people. He also flooded Wakanda, and although he was kinda possessed by the Phoenix Force, he later confesses that the only thing he regrets is that so many Wakandans lived, and he wasn't possessed when he said that. And that's after he pretty much told Thanos to attack Wakanda.
Rat from Pearls Before Swine qualifies as this sometimes, though the more sociopathic side of his personality tends to be emphasized. One time Pig jumped off a roof believing he could fly (It Makes Sense in Context) and, after waking up in the hospital asked Rat what happened. Rat begins to tell him the truth, but then pauses and says instead that Pig hit his head on the moon.
In one of the short stories Xadhoom answered a rescue call, and found it had been launched by an Evronian ship that had been drugged under the sea by a Kaijuu-sized octopus. Xadhoom's reaction to finding this out is to chase away the monster and rescue the Evronians, because it's the right thing to do (that's before killing the Evronians. They are her enemy, after all).
Angus Fangus. This journalist is abrasive, dirty, greedy and calling our protagonist a criminal on TV. He's also after any form of injustice, and the scoop that made him famous internationally was exposing a traffic of nuclear weapons.
Woody (of Quantum and Woody) won't pass any opportunity to deflate his friend's wild theories and excessive idealism, but he won't hesitate to help when the chips are down.
All of Scott's friends qualify to varying degrees from Scott Pilgrim, but the one who stands out is Kim Pine. Kim Pine may be a bitter Deadpan SnarkerGrumpy Bear (with misanthropic tendencies and an inferiority complex to boot), but also a true friend of Scott, helping him with Sex Bob-Omb, despite things like their relationship ending due to him moving, but the problem was him telling her via proxy (their friend Lisa) rather than her directly and, in volume 5, she demonstrates her friendship with him faking an SMS from Ramona, ignoring her own feelings towards him, in order to give Scott support in his fight against the two exes she also offers him her house (and her own bed) when Scott is homeless, helps him with his depression over Ramona's disappearance and even kisses him a last time before his fight with Gideon.
Scott himself is something of a variation in that he is generally a nice guy who has a few mean qualities and a bit dull.
J. Jonah Jameson from the Spider-Man comics is another good example. Sure, he's short-tempered, tight-fisted, and an often obnoxious loudmouth, but he's also been shown as a tireless crusader supporting everything from labor union rights to mutant rights, going after organized crime figures and corrupt politicians despite repeated attempts on his life, and discreetly supporting various charities and social projects, and even hiring a good lawyer for Peter Parker when Parker was falsely accused of murder. He's been pretty much consistently portrayed as a social liberal whose ideals are wrapped in civil liberty and constitutional rights. despite the fact that he's a mean-spirited douche to the people around him.
In the arc where Spider-Man publicly unmasked himself as Peter Parker, Jameson went so far as to refer to Parker as being like a son to him, and that he had always regarded Parker as the "last honest guy in town". What does Jameson do next? Turns around and sues the crap out of Parker for misrepresentation. Of course, he wasn't entirely unjustified in doing this; he was also later confronted by other characters about how much of a jerk he'd been to Spider-Man / Peter over the years.
It should also be noted that Jameson's character is interpreted drastically differently, Depending on the Writer. Some writers really tend to push the "heart of gold" aspect, whereas others still prefer to present him as a genuine Jerk Ass, ignoring any character development to the contrary by other writers. (This usually coincides with alternating interpretations of Jameson as a genuinely competent newspaper publisher and an angry tabloid publisher with an agenda. The latter version is occasionally characterized as clueless and outright sociopathic, too, whereas the former version sometimes borders on hidden philanthropist. It's really inconsistent, to say the least.)
It should be noted that during Stan Lee's run on Spider-Man Jameson is always a Jerk AssScrooge who feels that appearing to have a heart of gold is the best way to make money.
Mainly though, the character seems to be kind of like Spider from Transmetropolitan. He's a complete asswipe, no doubt, but he surely is also a kind person at heart and has shown this on several occasions. For example he genuinely cares about honesty, integrity and civil liberties and can be quite nice (or at least, less caustic) to his friends, like Peter or his employees, despite being a sarcastic jerk.
JJ was once offered a deal: if he stopped bashing Spidey every time he needed an editorial, he'd get an exclusivity deal with the New Avengers. He even got to hear Captain Fucking America tell him Spidey was a hero rather than a monster. His response? After shaking hands on the deal, he promptly went back to not only committing libel, but making accusations of bribery and digging up things like "wanted murderer" (Wolverine), "terrorist" (Spider-Woman) and "convicted drug dealer" (Luke Cage, who was framed and exonerated).
These inconsistencies are avoid by the Ultimate Universe J. Jonah Jameson (probably because the only writer was Bendis). He embodies this trope completely. Three examples stick out - firstly, after firing Peter in a temper tantrum, he comes to the kid's house and opens up to him about his son dying, before offering to give him his job back and allowing him to start shadowing Ben Urich so he can get a taste for real journalism. The second is him doing a Heel–Face Turn on the whole Spider-Man thing after the Ultimatum arc when it's not certain if Spidey survived, and writing a heartfelt public apology/obituary for the webslinger. Lastly, he eventually discovers Peter's secret identity and his first reaction is to offer him money. He says he'll pay for Parker's entire college education on the basis that "I'm a rich man, I'd hardly notice."
In DC vs. Marvel, when it looks like The End of the World as We Know It, Spidey asks Jameson if he has any last digs to get in. Jonah responds "For what it's worth, I'm sorry", to which Peter can only say a quiet "Oh."
In the storyline The Death Of Jean De Wolff, Jameson responds to a question about whether he believes Spider-Man deserves to die with "Hitler deserved to die, so do assassins, cop killers, scum like that. Whatever else he is, Spider-Man is not one of those."
Jed Poole from Star Raiders yells bombastic insults at anyone within earshot, but he won't hesitate to leap into action if any of his companions are in danger. Though there are still times that he acts like a monster.
Raphael from the Teenage Mutant Ninja Turtles in a few comics, and also more than just the comics as the first couple of films, the new animated series, and the most recent CGI film have shown.
Guillotine too. Most of the time, she's a gothic and unsympathetic bitch who likes to bully others, but when she's with Piruja, she switches into a kind and compassionate older sister figure who will do anything to protect her and keep her happy.
Cyclonus in Transformers: More than Meets the Eye in order to maintain his reputation as a powerful warrior. It's most visible in one scene where he scorns Tailgate's offering of innermost energon, a Cybertronian ritual carried out by the bedside of a critically injured friend or loved one, by smashing the vial to the floor, then stops at the doorway and goes back to help Tailgate clean it up.
Whirl has pretty much confirmed his Heart of Gold journey by the time of the Dying of the Light arc. He wants to be accepted despite his disfigurations, but his insanity and angry, bitter nature often causes him to make bad judgements. On the other hand, in certain specific ways he's shown an impulsive Stupid Good side, when doing the right thing is incredibly dangerous or hard, but he'll still do it.
Rodimus is a gigantic Glory HoundManchild with zero humility and a basically nonexistent sense of responsibility, to the point where a very recently reformed Big Bad is a more effective captain, but he really does want what's best for his crew; he's just not very good at working out what that is.
Spider Jerusalem from Transmetropolitan is a huge jerk, but he does have a heart of gold. He stands for truth and justice, he's just an ass while doing it, and has done something so small and good-hearted as comforting a lost little child and buying her pawned doll back for her.
Gennosuke from Usagi Yojimbo, who is, in the title character's words, "a money-loving cheat" who has managed to swindle Usagi more than once. Still, he's done several acts out of the goodness of his heart, which upsets him to no end when Usagi compliments him on it.
The same applies to Gen's fellow Bounty Hunter and occasional partner Stray Dog, who shows every sign of being a ruthless, cheating Jerk Ass until we learn that he donates the lion's share of his profits to an orphanage.
This is a frequent characterization of Wolverine. He's always talking back to authority figures, even if he agrees with their choices, will regularly get into fight with friends with next to no provocation (at one point trying to kill Colossus for daring to save his life) and is unapologetic in his killing, few cases aside, because he thinks, no matter what people say, it's what they want from him. However, he is deeply loyal to his friends, and will go out of his way to get his own hands dirty so no one else has to.
Northstar tends to be something of an acerbic arrogant bitch to everyone around him... except his Tennessee Williams-style mentally ill sister (well, most of the time, anyway) and especially his deceased adopted infant daughter, Joanne Beaubier.
In his darker characterization Cyclops is this. In recent times he formed a hit squad of the more sociopathic members of the X-Men to kill the X-Men's greatest enemies. Before that he had a psychic affair on his wife who died later (Though he was going through a deep emotional breakdown and he was manipulated into doing so) and before that abandoned his wife and son to go to his ex girlfriend (but at the same time he was emotionally conflicted, tried to make it up and felt really guilty afterwards as well as possibly being manipulated into doing that as well). However, he only formed the hit squad in the first place to protect mutants from their most dangerous enemies while they were on the verge of extinction where all it would take is the slightest super weapon to destroy them. In Deadpool X Marks The Spot he sends Wolverine to kill Deadpool, but only because he risked making the X-Men look like monsters and earlier comforted Mercury when her father was being a dick. And while he at times is displayed as a cold emotionless leader, he was visibly upset when Thunderbird (A real Jerk Ass) died despite him being powerless to stop it from happening, as well as feeling guilty that he allowed Kitty to get trapped in her ghost state/a giant bullet.
Emma Frost also tends to be this. Despite of being the bitch that she is, she cares about the mutant race, her friends, her students and Cyclops.
Hellion as well. He's a smug, arrogant, self-entitled prick to most everyone, but also fiercely loyal to and protective of his friends. Seeing many of them killed during Stryker's attacks against the school would affect him very deeply.
The racial hat of the Klegdixal from Buck Godot: Zap Gun for Hire is that the entire species is thin-skinned, ungrateful and obnoxious and everyone thinks they're jerks. Beyond their personality, however, they sell some of the best medical equipment in the galaxy and consistently oppose all forms of biological warfare and slavery of artificial lifeforms because they're morally disgusted by the use of technology for evil. They more than happily choose to sponsor the Beemah — a Servant Race made with Klex technology (without the Klex's knowledge or consent) that Turned Against Their Masters — because they view it as atonement for having their knowledge being misused in such a manner.
Reed Richards from Ultimate Fantastic Four means well... sort of, but there are moments where he's incredibly arrogant and bad tempered. Becomes a full on Jerk with a Heart of Jerk when he turns evil because he felt being good was holding him back.
Hawk from the Teen Titans, in some writers' interpretations. Otherwise, he's more known for being an outright Jerkass.