Western Fantasy Fiction has Drasek Riven from the Erevis Cale trilogy and The Twilight War. The second chosen of Mask, God of Thieves, Riven is a dark hearted angry man. The main character of these books, Erevis the first chosen of Mask, even remarks upon Riven's status as the better killer. Riven is a literal case of Petting the Dog, as the first sign of a good sign to him is when leaving a stakeout because he 'has other business to attend to'. Following Riven through the city we discover that he has two mongrel alley dogs he regularly feeds with scraps bought from a butcher. Before leaving the city, Riven even goes to the effort of paying (quite handsomely) a man to feed the dogs for the next year. Riven's case could have been done poorly, yet he never loses his status as a badass or suffers from Badass Decay; all of which is a testament to the author.
Lord Vetinari has several pet the dog moments — most related to his ancient terrier Wuffles, and more recently, Mr Fusspot.
Its said that, once a week, Vetinari goes to the grave of the late Wuffles and puts a dog biscuit on it. Yes, the tyrant of Ankh-Morpork, trained at the Assassin's Guild and who would kill people without a second thought if he thought it was in the interests of the city, still cares for his dear little dog.
Granny Weatherwax is a complicated woman
She acquires a kitten in Wintersmith, which she promptly names You (as in: "Stop that, You!"). She makes a show of not caring for it... but then cares for it when no-one's looking. By the end of the book You is found curled up on top of Granny Weatherwax's head, under her hat (Granny gives the lame excuse that it keeps her head warm).
In Masquerade, Agnes (or Perdita X, as she called herself for most of the book) was held in mild contempt by Granny for a large portion of the book. After Agnes has had all her hopes at being an opera singer crushed (despite being the real heroine), she reluctantly returns to Lancre. Granny, in a rare moment of genuine kindness, tells Agnes that as a young woman, she called herself "Endemonidia" (but not for very long), showing that even she started off as a bit vain and foolish.
Maybe subverted and maybe not when Granny saves Diamanda Tockley (who hates Granny and is responsible for allowing the elves to invade) from the realm of the elves. When she is shot and knocked out by a poisoned elf arrow, Granny picks her up, slings her over her shoulders, and flees while the elves shoot at her. When Nanny admits to being impressed that she did this, Granny just claims that she was using the girl as a human shield. Of course, she probably could have run a lot faster if she wasn't carrying someone else...
Greebo is one to Nanny Ogg. Despite the fact that Greebo is part homicidal, part sadistic and all wild fire explosions, he is still a cat except when he's a human. That does not stop Nanny Ogg from loving it.
Death usually an example of Creepy Good given his various attempts to understand humanity while always getting it slightly wrong, but he has an uncomplicated fondness for cats
In Dragon Bones about the only nice thing Ward's abusive father ever did was to employ Stala, a woman, as trainer for his guard. She is good, so this didn't affect him negatively; she is his wife's half-sister, so she's family; and he had an affair with her. It is unclear at which point in time the affair started, though.
In From the Earth to the Moon by Jules Verne, the antagonist, Captain Nicholl, eventually challenges one of the protagonists, Mr. Barbicane, to a duel in the wilds of Florida. When two other protagonists try to stop the duel, how do they find Captain Nicholl? He has put his weapon aside, to save a small bird who has gotten stuck in a tarantula's net.
Significant is Jaime Lannister, who is the only member of his immediate family to show any kindness to his brother Tyrion. He gets a few more as the series progresses.
Jaqen H'ghar pets Arya. Which is horrific news for several of the nastier villains.
One of Gregor Clegane's men, Shitmouth, is mentioned as giving captives extra bread if they want.
Melisandre's creepy magic and morally dubious methods (including assassination and human sacrifice) frequently put her in conflict with King Stannis' other advisor, the loyal and upright Davos Seaworth. But in A Dance With Dragons, she tries to keep Davos' 12-year-old son out of danger because she feels sorry for Davos and doesn't think he needs to suffer any more grief.
Sandor Clegane rescues Arya from certain death at the Red Wedding, even as he knows the people he planned on ransoming her to are being slaughtered.
Both the Clegane brothers have soft spots for dogs. About the only things that cause Gregor Clegane to show any emotion other than murderous rage are his dogs, and Sandor only seems truly happy when around them.
Raistlin of the Dragonlance saga, a treacherous, twisted Villain Protagonist (albeit an ensemble one) driven by bitterness and insatiable ambition, has a kindly streak when it comes to the downtrodden and pitiful... as he knows firsthand what it feels like to be helpless and hated. This leads to many Pet the Dog moments, especially with Bupu the Gully Dwarf, who inadvertently becomes a kind of Morality Pet.
Childhood's End by Arthur C. Clarke includes a sort of intentional and public Pet the Dog, when the Overlords issue a decree that all nations of the world must have strict laws to prevent animal cruelty. It's unclear whether the Overlords really are that nice and well-intentioned, or if they just want everyone to think they are.
In the Warcraft novel Lord of the Clans, Grom Hellscream chastizes his fellow orcs for kidnapping a child, since that was not how warriors acted.
Variations of this happen a few times in the World of Warcraft as well, as Grom is highly suspiscious of the Forsaken because of their willingness to use the Plague against the living, and views it as a highly dishonest way of engaging in warcraft.
In Joe Abercrombie The First LawBlood Knight Ferro is almost on the point of killing The Igor Severard because he was trailing her and asks him for any reason why she shouldn't. After reflection Severard says that he's worth killing, but the birds he usually feeds don't deserve to lose that source of food. Ferro doesn't kill him — which is arguably one of her own rare Pet the Dog moments.
Mandalorian Walon Vau, a Drill Sergeant Nasty type, dotes upon his pet strill Lord Mirdalan. He takes Mird with him everywhere, wipes up any food it spills on itself, and is prepared to sleep outside with the strill when it isn't permitted indoors. The man is tough as nails, but he takes Mird into battles in the same way, and with the same care, as fathers in his culture take their sons.
In the X-Wing Series, Imperials who aren't all bad inevitably Heel–Face Turn into Rebels. As Imperials they avoid the casual cruelty of their peers. In the books, one Imperial Star Destroyer captain has a scene where he fusses over his outfits, trying to pick the one that will please his lover the most. Another goes over how he was assigned to wipe out a village which had produced an assassin, and while he did destroy it, he went down and told everyone first, and gave them time to evacuate. In the comics, Sixtus Quin admires how the Rebels fight before being betrayed and pulling a Heel–Face Turn. And Baron Soontir Fel has stunning integrity and loves his wife.
In The Thrawn Trilogy, our first real look at the smuggler and Knowledge Broker Talon Karrde has him having dinner with Mara Jade and telling his vornskr, a doglike creature, to leave. He chastises it mildly and tosses it a bit of meat before it leaves.
Yun, a Dark Jedi apprentice from the Dark Forces Saga novelizations, is spared by Kyle Katarn, which starts all sorts of philosophical questions going in his mind. He begins to wonder if the Dark Side really is stronger, and if his masters are right. His first and most significant Pet the Dog moment is when a cave-in in an archaeological mine traps a worker beneath a massive slab of rock. The other workers and droids can't lift it as it slowly crushes him. Yun, unwilling to leave the man to die, as any other Dark Jedi would, tells the others to get ready to pull him to safety and focuses all of his willpower on lifting the rock. He succeeds just long enough for the soldiers to save the man, and only afterwards realizes that he had abandoned the Dark Side when the chips were down.
The only Star Wars villain less likely than Jabba the Hutt to have a pet the dog moment is Palpatine, but in a bit of EU canon a close friend of Jabba's recalls the time the Hutt saved his life. Long before the events of the original trilogy, Jabba and Ephant Mon were raiding an Imperial weapons cache only to be double crossed and attacked by stormtroopers. They escaped but were caught in the middle of a fierce blizzard with no transportation or shelter. When Ephant Mon passed out from the cold, Jabba shielded him with his layers of fat to keep him warm, saving his life. This wasn't because the Hutt needed him for some reason, but because they truly were friends.
In Dark Lord—The Rise of Darth Vader, Vader is surprisingly lenient with Bail Organa for harboring Fang Zar. When Zar nearly escapes, Vader accepts Bail's word that he wasn't involved. Vader also expresses sorrow when Shryne kills Commander Appo, outright stating that he was fond of him.
One could argue that the entire Gaunt's Ghosts and Ciaphas Cain (HERO OF THE IMPERIUM!) book series of Warhammer 40,000 are extended Pet the Dog moments for the entire Imperium of Man, showing unmodified, poorly equipped, (relatively) poorly trained human beings fighting wholeheartedly for the Imperium and the Emperor, and that many of them are genuinely good people with noble motivations, forced to fight horrors beyond comprehension by sane minds.
In fact most games, books, whatever that are about one planet or army will be this.
Jefferson Pinkard from Harry Turtledove's Timeline-191 series starts out as a very likable character but slowly does a Face–Heel Turn until he's become the alternate universe's equivalent of Adolph Eichmann, ruthlessly sending the black population of the CSA to their deaths in concentration camps. However, to the end of the series he genuinely loves his wife and stepson and often worries about what will happen to them when the war turns bad for his side.
Jake Featherston—the CSA version of Adolf Hitler—gets a few himself, usually with his secretary. Described as a phenomenally ugly woman who is incredibly sensitive about her appearance, Lulu is devoted to Featherston, upon whom she nurses a sizeable crush. Featherston doesn't view her that way at all, but he does go out of his way to be polite to her, and doesn't tolerate anyone else being mean to her. At the end, when she's fatally wounded in a plane crash, it's Featherston who—at her request—puts her out of her misery.
Henry, from The Secret History, did organize the murder of one friend, attempt to kill another, and represent himself as a Magnificent Bastard in general. But he did save Richard from dying of exposure in the Vermont winter.
Mayor Poynt of the second Welkin Weasels trilogy is a spoilt jerk who steals money from charity collections and leaves the actual running of the city to his sister, but after an operation he's accidentally left to wake up in Bedlam House. Seeing what it's really like frightens him enough that he arranges for it to be cleaned up and turned into a proper hospital.
In Earth (The Book), the authors (this book is jokingly intended to be read by aliens who visit Earth long after we're all gone) take time to give Pet's a special section when discussing animals, and end their notes saying, "we're good boys. yes they were."
The Wolfhound once rescues a girl who was gangraped and Driven to Suicide by some thugs. Seing how women abuse is his personal Berserk Button, he immediately sets forth to hunt them down. He slaughters all but two thugs in the first encounter, and when he approaches those two, they try to plead for their lives: one tells that he was the one who convinced the gang leader to spare the girl's life, and the other - that he was only holding her. Neither case works.
Discussed in the Knight and Rogue Series. The villain of the second book has taken pity on a mute dog and given it food and shelter. Fisk is unimpressed by this, saying he's known many villains who were kind to animals and more who loved their mothers.
It's easy to spot the hero of Robin McKinley's Deerskin as heroic. Not because he's a prince of the blood (he is, but he didn't ask to be born one), not because he's tall and blond and heroically built (he's none of those), not because he gallops into battle on his mighty charger (he doesn't) ... but because he sits up at night with orphaned puppies.
In The Silmarillion, Maedhros's attempt to save the sons of Dior, and Maglor's fostering of Elrond and Elros. In both cases, said children were killed and/or orphaned because said Elves (reluctantly) led a completely unprovoked invasion of their homeland.
Skeeter's introduced as a minor villain in the first Time Scout book. The second doesn't give you much reason to think otherwise, until you learn about his back story. Just before that happens, he keeps a promise and gives a small fortune to a friend known to be perfectly innocent and good.
Horribly subverted in one chapter of the fifth book: the viewpoint character is a mook whose plan is going dangerously badly, and who is thinking about how he would much rather be back home instead and how much he misses his beloved sister. Then the plan fails completely and he has to kill an accomplice to cover his tracks; and as he's disposing of the body at the end of the chapter he goes back to reminiscing about his sister, and what a pity it was that she discovered what he was and would have exposed him...
A similar subversion occurs with a minor villain who has been causing a lot of trouble for the protagonists, yet persistently failed to capture them as per his mission. He's been told that as long as he continues to fail, members of his family will periodically be killed in horrific ways until there are none left. In a segment from his viewpoint, he expresses considerable grief and horror over this, but when a representative of the dark side appears, he immediately begins to babble about how many relatives he has left.
An in-universe case of this helps to resolve a major plot point, when Perrin rescues a child from a pile of rubble. The person he's with has been trying to decide whether he's really good or evil, which would determine whether his faction allies with Perrin or tries to kill him. Perrin's Super Senses mean that only he could have known the child was there, so he could have passed by with no one being the wiser and calling him out for it; the fact that he goes out of his way to help someone with no benefit to himself proves he's a good person.
In Harry Potter and the Half-Blood Prince, we see that Narcissa Malfoy might be a snobby pureblood supremacist like her husband, but she still is willing to risk Voldemort's wrath to find Snape (who, at this point, is morally suspicious to the good guys, the bad guys, and the readers in general) and beg him to protect her son from the suicide mission he's been given. Bellatrix, meanwhile, cements herself as a monster by dismissing Narcissa's fears and panic as her failing to realize what an honor her son was granted.
This is taken even further in the final book. Narcissa is the one who checks Harry's body after Voldemort used the Killing Curse on him. Of course she realizes he is alive, but she does not reveal this information to Voldemort. Instead, she asks him one question: Is Draco alive? At Harry's confirmation of her son's welfare, she turns to Voldemort and, with a completely straight face, lies through her teeth. This action leads almost directly to Voldemort's demise.
Subverted in the case of Mad-Eye Moody. After he seriously upsets Neville on his first day of class, he invites the kid for tea, talks to him about Herbology (the one class Neville is very good at), and loans him a book about magical plants of the Mediterranean. We later find out that "Moody" was secretly one of the people who tortured Neville's parents to insanity and only gave him the book as a way for Harry to figure out how to beat the Second Task, to get him one step closer to the plan to resurrect Voldemort.
Filch's best known redeeming quality is his love for his cat, Mrs. Norris. Of course, most of the students hate her almost as much as they hate her owner.
Filch is also more fond of the school than he's willing to admit. His status as a Squib would have barred him from attending classes, or even living at Hogwarts, if Dumbledore had not showed pity for him. Thus, Filch chooses to stay and fight at Hogwarts during the Last Battle even though he has no magic. And when the Battle is over, he resumes his duties as groundskeeper by quietly and respectfully tidying up the hallways so the wizards who died in battle have a proper resting place.
Although Chichikov (the main character of Dead Souls) is a cheapskate, the author informs us that he'll always give a copper to a beggar.
In the Indian novel The White Tiger: Even though Balram kills Mr. Ashok and shamelessly bribes the police to start his own business, he does have his moments, such as taking his nephew Dharam to the zoo and compensating the family of the boy one of his taxi drivers killed.
Blake Snyder's Save the Cat: The Last Book on Screenwriting You'll Ever Need doesn't just discuss this trope - he's the alternate Trope Namer.
The later books in the Honor Harrington series like to do this with the Mesans. One of them is a fan of Manticoran classical music, another one is a genuinely loving husband and father. The fact that they aren't monsters by the standard metric only makes what they do all the more chilling.
There's a hugePet the Dog moment in Antonia Forest's Autumn Term involving Lois Sanger, the Marlow twins' arch nemesis, who gets them both kicked out of Guides earlier in the book, and makes trouble for Nicola Marlow later on in the series. Their form opt to put on a production of The Prince and the Pauper for the school festival, and Tim Keith, who writes the play, wants to narrate. However, Tim is terrible and Lawrie Marlow panics about the play being a failure. Tim remembers hearing that Lois is a good reader, and when she shows her the script, Lois is impressed with it and offers to do the narration herself, effectively saving the play.
Subverted in the third book of The Immortals. Emperor Ozorne genuinely loves and cares about his songbird menagerie (that's why Daine is there, because they've taken sick). His nephew Kaddar, though, complains that Ozorne cares way more about the birds than the actual people of Carthak and Ozorne winds up being the Big Bad.
Played straight in Protector of the Small. Lord Wyldon ignores that Kel is keeping Jump as a pet and when questioned, says he's just a palace stray that's taken a liking to the pages. By the end of the book Wyldon has gotten over his dislike of a girl page. (We also learn that Wyldon's family is known for breeding dogs.)
Subverted again in the second Provost's Dog book. Big Bad Pearl Skinner likes dogs, and she's quite outraged when Beka tells how she separated scent hound Achoo from an abusive handler. Beka's a bit irritated to find that Pearl has one redeeming quality among her cruel, self-centered ruthlessness.
In the Rainbow Magic series, Jack Frost and his goblins get a lot of these moments, usually when they've done something really bad and realize it.
1632 has one for Cardinal Richelieu. He recieves a Siamese kitten as a diplomatic gift from an ambassador, marvels at how pretty it is and plays with it a little. Then he calls for a servant and very politely asks if the servant would be so kind as to make sure the little kitty is fed and given a warm place to sleep, if it wouldn't be too much trouble. He then goes right back to playing cutthroat politician with the ambassador.
To distinguish James Bond from his enemies, and show he is morally better than them despite also being a killer, Ian Fleming gave him a great empathy for animals. In Thunderball this even extends to a barracuda that tried to eat him; he's noticeably upset when he sees the fish has been mortally wounded by a depth charge detonated by the bad guys.
Griffin's Daughter: Elven prince Ashinji is captured by human forces. The usual fates for such a captive would be either immediate execution or transfer to custody of the Empress' forces for "interrogation". The local regent, Thesselina, chooses to Take a Third Option and give Ashinji to local slavers who run a gladiator ring. There, at least, Ashinji would have a fighting chance to live.
Fidelias (who is a ruthless, though not pointlessly cruel, traitor to the crown and currently working with its enemies to launch a coup,) save the lives of several Crown soldiers despite putting himself at some risk to do so. Afterwards, he asks himself why he did it, and consciously decides to settle for "it had pleased him", thinking that analysing his motives further than that might be a bad idea. Given that he works to bring down the Crown because he genuinely believes the Realm needs a new leader, and that he transfers his loyalties again when it becomes clear that the good guys do have a leader strong enough to hold the Realm together, the answer is actually obvious (to the reader, if not to Fidelias himself): he is an essentially decent man.
When the Awakened Vord Queen is in a position to completely exterminate humanity, she sets aside areas where they can live freely, safely and under their own government, the only condition being they let her sterilise them. Considering her Vord instincts are continuously screaming at her to immediately wipe out every non-Vord, the fact that she's willing to slowly establish Vord dominance by preventing new human life rather than immediately causing death and suffering to those who are already alive says a lot about her. Note that while this does indeed weaken the resistance against her she has the numbers to crush them completely if she wanted to, and this offer is not a trick; she fully keeps her word to them to the point that even after she's killed, the Vord she assigned to protect the surrendered humans continue to do so, even from other Vord
In Mansfield Park, Bitch in Sheep's Clothing Mary Crawford saves Fanny from a round of verbal abuse by Aunt Norris and cultivates a friendship with her, but the emphasis really is on pet the dog. She saves Fanny because she also doesn't want to participate in the activity Fanny's being pressured into and takes notice of her mostly because Maria and Julia Bertram have left for Bath; ultimately, she likes Fanny for being a convenient source of society when there's no one else available.
In The Hunger Games, Thresh spares Katniss in return for her earlier kindness to Rue. He does warn that it's a one-time offer.
In The Sapphire Rose by David Eddings, Sparhawk arrives for the showdown with his former friend-turned-nemesis, Martel. As they prepare for a final fight to the death, Sparhawk reveals that his beloved squire, Kurik, was killed by one of Martel's lieutenants. Martel is stricken by the news and offers his sincere condolences, remarking that he'd always liked that person and is genuinely sorry to hear of their death.
Troll king Thibault, presented as the Big Bad of Malediction Trilogy, has a moment of this, when he shows true kidness and care for his wife Mathilde. This does not extend to his son Tristan, though, whom he tortures and threatens with death.
Subverted in The Dinosaur Lords, when Falk and Bergdahl discuss how to get to the Emperor. When Bergdahl suggests using Emperor's daughter, Falk vehemently protests, stating that he won't involve a ten-year-older into such thing. A moment later, however, he adds that this is because if they were found out, the Emperor would have their heads on a plate, as contrasted to his typical resigned acceptance of Deadly Decadent Court he lives in.
In Wolf Hall, the Duke of Norfolk hates Cromwell (indeed, he and Stephen Gardiner were responsible for Cromwell's fall and execution after the Anne of Cleves affair) and even when he visits during Cromwell's fever, it's implied that he's disappointed not to find him dying. Still, he does get one moment approaching kindness the day after Henry loudly and publicly accuses Cromwell of disloyalty by simply asking "all right, lad?" at the next council meeting.
Cromwell himself is very much a Villain Protagonist but is always kind to children and animals. He has a succession of little dogs all named Bella (and some cats) and when Anne's little dog is threatened with being thrown out a window Cromwell is also horrified and comforts her.
In the first book of The Traitor Son Cycle, de Vrailly's "angel" tells him that the King of Alba is going to be killed in an ambush, and that de Vrailly should take this opportunity to become the new king, as he's wanted. De Vrailly's code of honour, however, perseveres, and he switches places with the King and almost dies in his stead. Unfurtunately, the "angel" spins it as a Secret Test of Character, further securing de Vrailly's loyalty.
In the Malazan Book of the Fallen, Cotillion tries to alleviate some of Sorry's fear right before he possesses her, reassuring her that the experience won't be that bad. The further into the series you get, the more he seems to recover his compassion and humanity, often helping out Sorry, who renames herself Apsalar after the possession ends, and obviously regretting his treatment of her.
At one point in The Witchlands, Aeduen gets a little girl to care about for a while, apparently just in case the readers didn't feel enough sympathy for him.
The Dresden Files: "Gentleman" Johnny Marcone is a mob boss who pretty much runs Chicago, and pretty much anything involving adults is fair play. However, harm a child on Marcone's turf, and he will kill you. Personally, slowly and messily. Harry often laments the fact that Marcone is just human enough that he can't be written off as just another scumbag.
The Hearts We Sold: The Daemon isn't evil, but he's cold, strict, and willing to put the lives of teenagers on the line. That said, he pays them very well, always keeps his word, and occasionally does something kind of nice, or shows the barest hint that he does care about his charges on some level.
Villains by Necessity: The group all have moments and relationships that keep them from being entirely evil people. The most obvious and present is Blackmail's sincere and touching love for his horse, to the point of nearly hitting a Despair Event Horizon when it dies.
"Clockpunk and the Vitalizer" has The Vitalizer feed Clockpunk donuts when she's hungry and (albeit grudgingly) get up to wipe her face, along with making a couple of concessions to make her more comfortable while she's his captive. He probably didn't expect her to repay his courtesy with an attack.
The Limbo is this when compared to the whole Hell. The souls that belong to this circle didn't commit sin but neither were baptized, thus aren't free from the original sin and are still condemned to eternal punishment... which consists of staying in a somber, foggy place where they can move and talk freely and don't suffer any pain except from being unable to participate in the Eternal Love.
Dante feels quite sad about Paolo and Francesca (a couple in the circle of the Lustful) as well.
Count Ugolino, a traitor in the depth of Hell, actually becomes pitiable when he tells his tale about his sons. Even more poignant if you consider that Dante's personal tragedy relates closely to Ugolino's because he was exiled from Florence with his (innocent) sons, as Ugolino was imprisoned with his. The fact that his family was condemned for his political choices weighted heavily on Dante's shoulders for all his later life.