The year of Shmitah cancels all outstanding debts. The Mishnah in Shevi'is teaches that if a borrower desires to repay the debt even though he is not obligated to, the lender must say, 'I refrain from collecting.' If the borrower insists that he wants to return the money nonetheless and says, 'Even so I want to repay it', the lender may accept it. Rabbah here adds that the lender may "hang him until he says this" ("v'Tali Lei Ad d'Amar Hachi").
One can ask on this how will Shemitah ever cancel a debt? If the lender has the right to force the borrower to pay him back, Shemitah is entirely ineffective???
The difference in this case is the borrower offered to repay it, so now the lender can coerce him to repay the debt. The borrower figured he could ease his conscience by offering to pay back the debt when he really knew that the lender would have to refuse the payment. We are shown an important lesson that when one eases his own conscience by making another person feel sad that he almost got back his loan, he loses out in the end. We have to be very careful to not misuse other people's kindness and take advantage of them and then boost our own ego at their expense.