Volume 3, Book 47, Number 803 :
Narrated by Abu Huraira (radiallaahu `anhu)
Allah’s Apostle (sallallaahu `alayhi wasallam) said, “The Prophet Abraham migrated with Sarah. The people (of the town where they migrated) gave her Ajar (i.e. Hajar). Sarah returned and said to Abraham, “Do you know that Allah has humiliated that pagan and he has given a slave-girl for my service?”
This is from the story of Sarah (Ibraheem’s wife) and the king of Egypt when he tried to have his way with her. The point of this narration in the Book of Gifts is that it shows that slaves can be gifted to others.. and to that one can accept gifts from non-Muslims too, provided they’re not unlawful in themselves e.g. alcohol.
Read more on it here.