Use the object editor to create a custom ability (based on War Stomp or something self-targeted). Remove all normal effects from it, and set it to be learned by a hero of your choice at a level of your choice. When the level is reached, the hero can learn the ability in-game.
Then, make a trigger that states whenever that hero uses that ability, to replace that hero with the evolved hero, optionally keeping items/levels/abilities etc. It's as simple as that.