It depends upon:
- What state you're in
- What he's doing when you shoot him
Self-defense law is state and local. Know your applicable law.
In Ohio, if he's fleeing (and not shooting over his shoulder), it's almost certainly going to be a bad shoot.
On the other hand, if he's attacking someone else in your house, it's almost certainly going to be a good shoot. In Ohio (and most other places), you're allowed to come to the defense of another, if were you in their place, you could defend yourself. You've got no duty to passively stand by and watch somebody strangle your children.
In Ohio, anything else is going to depend entirely upon the totality of the circumstances. Castle doctrine gives you the REBUTTABLE presumption that you were in reasonable fear for your life, when in home or vehicle.