Theme vs Moral
Rather than 'moral' you might want to consider this concept as the 'theme' of your story. Theme is a broader term, morals generally go along with parables.
"Never steal from the gods" is a moral.
"Indirect consequences of un-earned power" is a theme.
You do not want to switch themes midway through the story. Themes accumulate in the reader, and a muddy mixed-message is worse than no message at all.
I suggest finding a theme that works by conditional logic, in your case you need a theme that makes sense why the hero's family is sacrificed when the hero 'does it wrong'. The same theme should also work under whatever method your hero learns to 'do it correctly'.
What are the rules, exactly?
Gods tend to be very picky about how their sacrifices and adulations are performed, the reasons why are esoteric, obscure tradition, or just plain contrarianism.
There is a whole backstory to Cain and Abel where Cain is a farmer and Abel is a shepherd. Their god prefers a blood sacrifice of lamb over vegetables, so (wiggle-room for artistic interpretation) Cain offers up a more valuable human sacrifice which goes badly for him. This parable is muddy because it was ret-conned to explain why later that same god kills everybody in a flood for having descended from Cain (not their fault)…, but God told everyone to leave Cain and his descendants alone…, huh? The moral is supposedly 'don't kill your brother', but the situation is problematic, and also God kills everybody so it's one of those rules He doesn't bother to follow himself. The theme is 'Do as I say, not as I do' which is maybe accurate but not a very useful moral, imho.
In an unrelated myth Helen, Queen of Sparta, walks away from her unsatisfying marriage to get some side-action with an 18yo. They both worship Aphrodite who is all about the sexy-funtimes, so despite the shocking behavior they are good – haven't technically violated their deity's rules. Meanwhile, every hero in Greece sails over to Troy to force Helen to come back (without Helen the Spartan government is invalid: they rule, she co-reigns with her sister – who ironically rules Sparta just fine without them). But nah, Helen sits up on the wall while the ultimate bloodsport takes place below, sacrificing the greatest warriors that exist in one-on-one combat, for years. The gods become so distracted by Helen's game, each meddling and taking sides, by the end she collapses the Age of Heroes and the world is plunged into a dark age. Afterwards the gods do not come down from Olympus anymore. Helen is not punished, she goes on to conquer Egypt. There is no clear moral here, but the theme is pretty bold: it's the story of an uncompromising woman who levels-up from queen to demigod to ending the world.