Yes, it's true. Even in a game that's sodark and edgy it makes The Exorcist look like a Disney movie, there are still heartwarming moments.
Dan Abnett, in his introduction to the Imperial Guard Omnibus (Vol 1), fittingly sums it up best with this quote:
In the grim darkness of the far future there is more than war. There are real people there too.
The general concept of Flight of the Eisenstien, in which Captain Garro remains loyal to the Emperor even as the rest of the Death Guard falls to Chaos and risks almost certain death to Bring News Back and give the loyalists time to rally in the face of Horus' betrayal.
The end of Ben Counter's Horus Heresy novel Galaxy In Flames. They survived the virus-bombing, they had inflicted serious damage in ground fighting, and now they are being bombed to death. Tarvitz had desperately gotten to the betrayed Emperor's Children so that he could die with his brothers, in defiance of the breaking of brotherhood that Horus had imposed on them, but at the end, he looks about the survivors — Emperor's Children, Luna Wolves, World-Eaters — and realizes that he knows all their names, and that men who had been only faces to him had become his brothers. One asked them if they had harmed Horus, and Tarvitz assured him they had.
Captain Uriel Ventris from the Ultramarines managing to save himself and the rest of a warband of space marines expelled from their respective chapters from commiting suicide due the desperative influence of Chaos by reminding them that even in their disgraced state they were still Space Marines, the greatest heroes of the galaxy, warriors of the Emperor, and then accounting all the victories of the Imperium, showing them that they were still men of honour and proud.
In Dead Sky, Black Sun, when Uriel notices the Unfleshed's crude statue of the Emperor, proof that they never lost their faith in Him.
In Malleus, a space marine during the attack at the Triumph attempts to save a small child. He cradles it until he gets it out of the line of fire. Sadly, its subverted in that the child was a Alpha Plus psyker, and then it forces Eisenhorn to kill the marine. Its the idea that a marine would risk his own life to save one person out of millions is so unlike the tone of the story, which is thoroughly grimdark.
The Space Marine Battles Novel Rynn's World has an especially heartwrenching scene that doubles as a Crowning Moment of Heartwarming. Captain Cortez saves a mother and her children (one of whom is just a baby) from being murdered by Orks. Chapter Master Pedro Kantor is less than pleased with this development, as there are (to his knowledge) only a dozen or so Crimson Fists left after the destruction of their monestery, and they cannot afford to bring refugees along. But Kantor says that the family can tag along as long as they can keep pace with the Space Marines, which anyone will tell you is no small feat. After a while, the mother becomes tired and unable to keep up. Kantor moves to the back of the column, to (as the reader is led to believe) "grant her the final mercy." As he kneels next to the mother with his wrist-mounted storm bolter pointed disturbingly close to her head, we believe he's going to kill her. Then, after the mother pants that she tried, but her children were just so heavy, Kantor (who, I feel the need to stress, did not want her there in the first place) replies with the following:
And he picks her up in his arms and carries her the rest of the journey to rejoin their remaining battle brothers. If that doesn't encapsulate what it truly means to be a Space Marine in Warhammer 40k, I don't know what does.
It further exemplifies why the Space Marines are held up as legends and saviors as well. The stories are born of deeds such as this. By the people they save. Which means there is still hope if there are survivors in this horrible galaxy.
In the Salamanders Novel, the titular chapter find a lost world and under the surface resides a colony of humans. Despite the difficulties faced by the company, they take the time and munitions to defend this colony, and discover a Salamander who has remained there since the heresy. Their reactions to finding this ancient, and knowing they can't save them harkens back to the original ideas of Space Marines, not as Knight Templars they are now, but as defenders of humanity.
Another moment in the book is when the colony is attacked by the local chitin-beasts en masse, and losing. The Salamander squad at the scene immediately throws themselves into the defense of the colony, saving as many colonists as they can. One, Ba'ken, who comes from a warrior tribe making him extra warlike even compared to the other Salamanders and has been described as "hulking" by other Space Marines, grapples with a predator that was attacking Val'in, the young boy who lead the Salamanders to the colony in the first place. When another chitin shows up, Ba'ken resigns himself to his fate, but Val'in puts himself before it and him, swinging at it with a shovel to try to fight it off even with Ba'ken screaming at him to run to safety, allowing both of them to be saved by another Salamander coming to their aid. Later, after the chitin beasts are driven off, Val'in goes up to Ba'ken and touches his greave, calling him a "Fire Angel", the local folklore name for Salamanders. Ba'ken is so overwhelmed with emotion from this simple act and the boy's bravery in the fight that he can't even answer. And best of all, Val'in returns two books later as an aspiring Salamander, under the eye of Ba'ken, who is being promoted to Master of Recruits.
The Salamanders are known as one of the more compassionate chapters. When their Chaptermaster learned that another, less moral Space Marine chapter wanted to open fire on an imperial colony just to weed out the enemy while writing off the citizens as "collateral damage", the Salamanders flew into a rage and almost declared open war on the other chapter simply in defense of the civilians.
Another Salamanders moment is the entire short story Vulkan's Shield. The story starts with Captain Ko'tan Kadai and his elite guard on a Thunderhawk, heading towards a final objective in a city besieged by heretics. All throughout the story Kadai keeps repeating that the mission is not over, that there is something in the city the Salamanders need to bring with them before they can leave. Finally they arrive at a Scholam, the 40k version of a school, annihilate a small force of heretics and then blow open the roof, revealing a handful of kids and their teacher. The Salamanders came to rescue them, risking the lives of their Captain, his guards, and a venerable Thunderhawk gunship, just for a few kids. Defenders of humanity indeed.
Kayvaan Shrike, a Raven Guard captain is a great example. Having survived 2 years behind Ork lines and winning the battle back gained control of his own company. And then, a WAAAAGGH!! is waged by the Ork Skullrak, and Shrike goes to the system being attacked. But does he attack the Ork mob head-on? Does he help enforce the world under siege? No, he goes to the worlds left behind by the imperial guard and saves the remaining humans there. He's considered a savior and hero, a legend among the citizens. And let me remind you, he's a Space Marine, a heartless killing machine.
This deserves clarification, the Nightbringer, the GRIM FUCKING REAPER couldn't put the fear into the Orks. Kayvaan could, and thats why the Imperium sees him as a saviour.
In the Space Marines Battles novel The Siege of Castellax the slave Yuxiang, who has started a rebellion against the Iron Warriors and watched it fail as one Iron Warrior kills all his friends and comrades and starts hunting him, is caught in an avalance and emerges unharmed. And then sees that the Iron Warrior, Skintaker Algol the most brutal Iron Warrior overlord on the planet, has been trapped and cannot get to him. He then executes Algol, telling him that sometimes even a man can kill a god, and avenges his comrades by making Algol die like a slave and not a warrior. Doubles as a Moment Of Awesome and Heartwarming Moment.
YMMV here, but, there's the story of Tuska the Daemon-Killa. Tuska was a Warboss who one day ended up fighting against a Warp-Beast. He ended up defeating it in single combat. He decided he really liked killing Daemons, so he launched a WAAAGH! into the Eye of Terror. He ended up taking over several Daemon Worlds, until he landed on a planet ruled by a Daemon Prince called the Blood Prince. Long story short, Tuska was mortally wounded, but he ended up killing the Daemon Prince with a Groin Attack with a Power Klaw before dying. So far, a Crowning Moment Of Awesome. Then Khorne is so pleased with this that he ends up bringing Tuska and his WAAAGH! back from the dead to do it all over again. The Ork's resolve and bloodlust impresses Khorne so much that he transported Tuska and his WAAAGH! to his personal realm, to fight his Bloodletter generals in an eternal conflict. While it might sound like an endless hell, Orks love fighting. Tuska's still fighting at the foot of the Brass Citadel with the personal approval of Khorne, where he fights his most favored enemy for eternity in what amounts to the closest thing an Ork can get to Valhalla.
Great Boss Tuska: Told yer I knew where da best fightin' woz.
The Ghost Halls is about the Grey Knights saving the soulstones of a dead Craftworld form a Daemon Prince and waiting until Eldar show up to collect their dead. At first the Eldar are quick to be their usual arrogant selves, but once they learn what happen they're not only shocked by it but thankful that the Grey Knights would save their fallen from Slaanesh. The Farseer apologizes for their rudeness and vows the Eldar will always remember the Grey Knights who died saving their fallen kin.
A bit of a meta one, but many fans and writers like to write stories with characters that are decent people, honorable in a sense, they do want to see the state of living improve.
The entire plot of the novella Blood and Fire:
The plot is set after the infamous Hive Helsreach battle and features Chaplain Grimaldus coming to the aid of the Celestial Lions Chapter. Bit of backstory here; the Celestial Lions are a Chapter that once took part in a battle against Chaos that the Inquisition ended early by Exterminatus. The Lions were horrified as this killed millions of innocents and they felt they could have saved them, so they call out the Inquisition for it. Even when the High Lords ignore them they don't stop, demanding the Inquisition be held accountable for a massacre. Things gradually turn against them as accidents in battle and disappearances of Chapter command whittle them down, until Armageddon where faulty intel and unusually accurate sniper attacks leave less than 100 of them alive. The last Apothecary in the Chapter is killed just as they reach safety, by someone shooting him in the temple with a drill-las. The Chapter is convinced they are doomed and resolve to die with their fallen brothers. Until Grimaldus says screw that! and leads the entire army of Hive Helsreach to support the Lions in avenging their honour against Ork Warboss Thogfang, which the Lions Pride-Leader Dubaku manages to kill. After this he orders the Lions to return to their home and start rebuilding, which is made easier when High Marshall Helbrecht arrives and gives Dubaku, the new Chapter Master, an ancient suit of Power Armour from the Heresy, a Strike Cruiser and an elite detatchment of Black Templars to help rebuild this Chapter that put honour and what is right over their own existence. For once in 40k a story where honour and justice prevailed and the guys who did the right thing were rewarded for it.