Rambam (Malveh Ve'Loveh 5:6):
ישראל שלווה מעות מן הגוי ברבית וזקפן עליו בְּמִלְּוָה, ונתגייר, אם עד שלא נתגייר זקפן עליו במלוה, גובה את הקרן ואת הרבית. ואם משנתגייר זקפן, גובה את הקרן ואינו גובה את הרבית.
In a case where a Jew borrowed money from a gentile at interest, and then the gentile converted; If a reckoning was made before he converted, the convert may collect the principal and the interest. If a reckoning was not made until after he converted, the convert may collect the principal, but not the interest.
אבל גוי שלווה מישראל ברבית וזקף עליו את הרבית בְּמִלְּוָה, אע"פ שזקפן עליו אחר שנתגייר, גובה את הקרן ואת הרבית, שלא יאמרו, "בשביל מעותיו נתגייר זה"; וגובה הישראלי ממנו אחר שנתגייר כל מעות הרבית שנתחייב בהן כשהיה גוי.
Different rules apply when, by contrast, a gentile borrows money from a Jew at interest and then converts. After a reckoning is made, even if it was made after the conversion, the convert is required to pay the entire sum, the principal and the interest. This measure was instituted lest people say that the person converted for the sake of his money. Even after he converted, the Jew can collect the entire sum of interest for which he became liable while he was a gentile.