He does not have to anything, either offering expiation (kafaarah) or paying blood money (diyah), because he killed him to ward off his evil and to defend himself.
Ibn Qudaamah said in al-Mughni (9/152): With regard to anyone who assails a person to take his wealth or kill him, the ruling is the same as that which we have mentioned about the one who enters his house, warding them off with the least with which they can be warded off. If there is between him and them a large river or a ditch or a fortress that they cannot breach, then he has no right to shoot at them, but if he has no option but to fight them, then he has the right to fight them and kill them. Ahmad said concerning thieves who want to kill you and take your wealth: Fight them to defend yourself and your wealth. ‘Ata’ said concerning a muhrim (pilgrim in ihraam) who is overwhelmed by thieves: Let him fight them in the fiercest manner. Ibn Sireen said: I do not know anyone who suggested not fighting the Harooris and thieves because he thought it was wrong, unless he was a coward. Al-Salt ibn Turayf said: I said to al-Hasan: I travel in all directions and I am afraid that the thieves may attack me for my wealth. If I refrain from fighting they will take my wealth, but if I fight them, you know what could happen. He said: O my son, whoever attacks you for your wealth, if you kill him then he will go to Hell, and if he kills you then you will be a shaheed (martyr). Something similar was narrated from Anas, al-Sha’bi and al-Nakha’i. Ahmad said of a woman whom a man wanted to rape, but she killed him in self-defence: If she knew that he wanted to have his way with her and she killed him in self-defence, then there is no sin on her. And he quoted a hadeeth that was narrated by al-Zuhri from al-Qaasim ibn Muhammad from ‘Ubayd ibn ‘Umayr, that a man gave hospitality to some people of Hudhayl, and he wanted to have his way with a woman among them, but she threw a stone at him and killed him. ‘Umar said: By Allaah, no blood money will ever be paid for him (i.e., there was no diyah for him), because if it is permissible for a man to defend his property which he is permitted to dispose of, then it is more appropriate that it be permissible for a woman to defend herself and protect herself against rape which is not permissible under any circumstances. End quote.
Al-Mardaawi said in al-Insaaf (6/243): If a person is attacked by a human or anything else, and he kills him in self-defence, he is not liable. This is the correct view and is the view of our companions. End quote.