It has been narrated on the authority of Abu Qatada that the Messenger of Allah (may peace be upon him) stood up among them (his Companions) to deliver his sermon in which he told them that Jihad in the way of Allah and belief in Allah (with all His Attributes) are the most meritorious of acts. A man stood up and said: Messenger of Allah, do you think that if I am killed in the way of Allah, my sins will be blotted out from me? The Messenger of Allah (may peace be upon him) said: Yes, in case you are killed in the way of Allah and you were patient and sincere and you always fought facing the enemy, never turning your back upon him. Then he added: What have you said (now)? (Wishing to have further assurance from him for his satisfaction), he asked (again): Do you think if I am killed in the way of Allah, all my sins will be obliterated from me? The Messenger of Allah (may peace be upon him) said: Yes, it you were patient and sincere and always fought facing the enemy and never turning your back upon him, (all your lapses would be forgiven) except debt. Gabriel has told me this.
Does this mean when a martyr dies he wont enter paradise because of a debt or that he wont enter paradise before judgment day then he would pay back the only thing one has on that day ones good deeds? Does this imply for every pious Muslim that dies living a debt for some reason?
The narrative should not be taken as expressive of the principle upon which people will be awarded heaven or hell. However, we can say that this must not be against the Qur'anic concept of the final judgment on the Last Day.
Two things need to be appreciated regarding martyrs. Every person that is killed in a war is not considered a Martyr (see http://www.renaissance.com.pk/mayq992.html) in the true sense of the word. The Almighty forgives transgression, which relates to man's relation with God and His rights and does not take the responsibility of the violations of the rights of the fellow humans. I can expect God to forgive my mistreatment with my fellows in the sense that I while doing so I violated God's clear commandments but I cannot expect Him to forgive me the same in regard to confiscating the basic rights of that particular person. It is only the concerned person who can forgive me. This is why all the Muslims believe that the Almighty does not necessarily forgive our sins committed against the society and individuals and He may forgive our failure to fulfill our obligations to Himself.
The referred to narrative highlights this aspect of the case and does not violate the principle that humans will go to the heaven on the good they have done in life on earth. It only deals with a specific person's case and we do not know why the Prophet (sws) stressed debt before him. It can be the person's weakness or the Prophet wanted to highlight the importance of repayment of debt. Hadith narratives should be dealt with placing them under the Qur'anic guidance or we are bound to draw wrong conclusions.