This hadith sharif is recorded both in Abu Dawud, and Sunan an Nasai
Sunan Abu Dawud : Dar-us-Salam reference / Hadith 4361
Narrated Abdullah Ibn Abbas:
A blind man had a slave-mother who used to abuse the Prophet (
ﷺ) and disparage him. He forbade her but she did not stop. He rebuked her but she did not give up her habit. One night she began to slander the Prophet (
ﷺ) and abuse him. So he took a dagger, placed it on her belly, pressed it, and killed her. A child who came between her legs was smeared with the blood that was there. When the morning came, the Prophet (
ﷺ) was informed about it. He assembled the people and said: I adjure by Allah the man who has done this action and I adjure him by my right to him that he should stand up. Jumping over the necks of the people and trembling the man stood up. He sat before the Prophet (
ﷺ) and said: Messenger of Allah! I am her master; she used to abuse you and disparage you. I forbade her, but she did not stop, and I rebuked her, but she did not abandon her habit. I have two sons like pearls from her, and she was my companion. Last night she began to abuse and disparage you. So I took a dagger, put it on her belly and pressed it till I killed her.
Thereupon the Prophet (ﷺ) said: Oh be witness, no retaliation is payable for her blood.
Sunan an-Nasa'i : Dar-us-Salam reference / Volume 5, Book 37, Hadith 4075
Ibn 'Abbas narrated that :
There was a blind man during the time of the Messenger of Allah [SAW] who had an Umm Walad by whom he had two sons. She used to slander and defame the Messenger of Allah [SAW] a great deal, and he would rebuke her, but she would not pay heed, and he would forbid her to do that, but she ignored him. (The blind man said) One night I mentioned the Prophet [SAW], and she slandered him. I could not bear it so I went and got a dagger which I thrust into her stomach and leaned upon it, and killed her. In the morning she was found slain. Mention of that was made to the Prophet [SAW] and he gathered the people and said: "I adjure by Allah; a man over whom I have the right, that he should obey me, and he did what he did, to stand up." The blind man started to tremble and said: "O Messenger of Allah [SAW], I am the one who killed her. She was my Umm Walad and she was kind and gentle toward me, and I have two sons like pearls from her, but she used to slander and defame you a great deal. I forbade her, but she did not stop, and I rebuked her, but she did not pay heed. Finally, I mentioned your name and she slandered you, so I went and got a dagger which I thrust into her stomach, and leaned on it until I killed her.
The Messenger of Allah [SAW] said: "I bear witness that her blood is permissible."