It is narrated from Abu Juhaifah (may Allah be pleased with him) that he said: I asked Ali (may Allah be pleased with him), "Do you have anything from the Messenger of Allah ﷺ apart from the Qur'an?" He replied: "By Him who split the grain and created the soul, we have nothing except the understanding that Allah gives to a servant in His Book, and what is in this scroll." I asked, "What is in this scroll?" He said: "The rulings of blood money, the rulings of freeing captives, and that no Muslim will be killed in retaliation for a disbeliever." In another place it is mentioned: "No believer will be killed in retaliation for a disbeliever."
Hadith Referenceمسند الإمام الشافعي / كتاب القتل والقصاص والديات والقسامة / 1625
Hadith Takhrijاخرجه البخارى الديات، باب لا يقتل المسلم بالكافر (46915)۔