When a Hero casts home portal and if he/her is under attack by ranged units (archers, spellcasters) their last hit will follow the hero to his/her destiny (sometimes that is enough to kill a hero on the other side of the map). The same happens with melee attacks (when the hero casts this spell during the enemy attack, it might actually hit him/her on the other side of the map – sometimes killing him/her too).
EDIT: heroes and summoner using blink are afected by this as well.