I have noticed early game, if i do auto battle with my leader against animal, he wins usually.... if there is a hero with him, the hero always dies. You can reduce the battle threshold in game options so it will take you into battle mode or remove the hero from the leader unit before he fights.
It is hard to avoid loosing units in melee combat, so I try to get my leader with a ranged combat spell ASAP and archery technology as quick as possible as well. Also you can give bows to heros so they can be useful in combat without risk of dying. Leave a number of Heroes in cities that are not defended and then buy bows for those hero's if the city comes under threat!
Logistics technology is another way to reduce unit attrition - since however number die in a unit, as long as the unit survives, it will be topped up back to full strength for free over time.