You can't dismiss him. You can leave him with 1 base unit and kill him with a neutral unit. Then, the hero can be resurrected in the tavern.
Double-click on the hero's portrait, open the third tab (the tabs are located at the bottom of the opened window), select the skills by clicking on them, and then press the green bird icon to confirm. Note that in the skill selection tab, there are also tabs at the top – for switching between the Strength/Magic branches and for viewing the faction's characteristics and the hero's unique features.
Auto-translated