All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
It is possible that you are referring to the Hadith narrated by Abu Burdah ibn Abu Moosa under the authority of his father that the Prophet, sallallahu ‘alayhi wa sallam, said: “There will come people amongst Muslims on the Day of Resurrection with numerous sins, as heavy as a mountain, and Allah, The Exalted, would forgive them, and He would place their sins on the Jews and the Christians.” [Muslim] The Hadith does not mean that all Muslims shall have their sins forgiven, but rather means that this would happen to a group of Muslims.
Moreover, scholars of Hadith held different opinions regarding the authenticity of the Hadith. Al-Bayhaqi classified it as inauthentic, and Ath-Thahabi, Ibn Hajar, and Al-Albani agreed on his opinion in this regard. Al-Hafith Ibn Hajar said in At-Talkhees: “Shaddad ibn Sa‘eed Ar-Rasibi reported Munkar narrations (i.e., some of his narrations were rejected).” [End of quote]
Al-Albani classified the Hadith as authentic in his book Saheeh Al-Jami’. He changed his opinion later on and judged it as Shath (i.e., Hadith narrated by a trustworthy narrator but it differs from the one narrated by other trustworthy narrators) in his book As-Silsilah Adh-Dha‘eefah.
Al-Bayhaqi said in Shu‘ab Al-’Eeman: “The authenticity of this Hadith is doubtful, and scholars of Hadith discredited the narrations of Shaddad Abu Talhah. Although Muslim ibn Al-Hajjaj cited his narrations in his book, his narration cannot be accepted when it contradicts that of other reporters, how about the case when many reporters transmitted narrations that contradict his narration and each of these reporters had better memorization skills than him! Therefore, it is pointless to resort to the figurative interpretation of his narration despite the fact that its apparent indication contradicts the authentic and established principles, inferred from the verse that reads (what means): {That no bearer of burdens will bear the burden of another.} [Quran 53: 38]. Allah knows best.” [End of quote]
Assuming it is authentic, An-Nawawi interpreted it in his book Sharh Saheeh Muslim, saying: “It means that Allah, The Almighty, forgives these sins for Muslims, and places equal sins upon the Jews and Christians for their disbelief and misdeeds, and thus, they would enter Hellfire due to their misdeeds and not because of the sins of these Muslims.” [End of quote] He added: “This interpretation is inevitable based on the verse that reads (what means): {That no bearer of burdens will bear the burden of another.} [Quran 53: 38]” [End of quote]
Allah knows best.