Sahih Muslim Book 20, Hadith Number 4681.

Chapter : In proof of the martyr’s attaining paradise.

The tradition has been narrated on the authority of ‘Abdullah b. Qais. He heard it from his father who, while facing the enemy, reported that the Messenger of Allah (may peace be upon him) said: Surely, the gates of Paradise are under the shadows of the swords. A man in a shabby condition got up and said; Abu Musa, did you hear the Messenger of Allah (may peace be upon him) say this? He said: Yes. (The narrator said): He returned to his friends and said: I greet you (a farewell greeting). Then he broke the sheath of his sword, threw it away, advanced with his (naked) sword towards the enemy and fought (them) with it until he was slain.