From Sahih Muslim (Hadith 4311):
Abu Huraira reported that Abu'l-Qasim (one of the names of Allah's Messenger [may peace be upon him]) said:He who accused his slave of adultery, punishment would be imposed upon him on the Day of Resurrection, except in case the accusation was as he had said
Reference: Muslim 4311