Yes. In Islam, accepting the faith and sincere repentance erase the past, and no sin is too great for God's forgiveness. The Quran tells those who have wronged themselves not to despair of God's mercy.
The fuller answer
The Prophet ﷺ taught that Islam erases what was before it. A well-known story is of a man who had killed ninety-nine people and asked if he could be forgiven, and he was told that nothing stands between him and repentance. Companions of the Prophet ﷺ who had harmed Muslims earlier, such as Khalid ibn al-Walid and 'Umar, became among the best Muslims.
Repentance requires regret, stopping the sin, resolving not to return to it and, if others were wronged, making amends. Muslims believe the door of repentance remains open until the soul reaches the throat at death or the sun rises from the west.
Say, "O My servants who have transgressed against themselves [by sinning], do not despair of the mercy of Allah. Indeed, Allah forgives all sins. Indeed, it is He who is the Forgiving, the Merciful."
Except for those who repent, believe and do righteous work. For them Allah will replace their evil deeds with good. And ever is Allah Forgiving and Merciful.
This answer follows the mainstream Sunni understanding and is general learning, not a fatwa. Where Muslims differ, the answer says so. Have a question of your own? Write to us.