All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
The Hadeeth in question was narrated by Al-Bayhaqi, 'Abdur-Razzaaq, ‘Abd Ibn Humayd and Sa‘eed Ibn Mansoor . In the Hadeeth the Prophet, sallallaahu ‘alayhi wa sallam, forbade us from wishing to meet (face to face) the enemy and commanded us to stand firm, patient and to remember Allaah The Almighty when we face the enemy, and to be silent upon hearing their war screams at the beginning of the fighting.
This Hadeeth was also narrated in the two Saheehs on the authority of 'Abdullaah Ibn Abi Awfaa . In that narration the Prophet, sallallaahu ‘alayhi wa sallam, commanded us not to wish to meet the enemy, but when it does happen, to be patient.
Al-Munaawi interpreted this Hadeeth saying that the Messenger of Allaah, sallallaahu ‘alayhi wa sallam, forbade us from wishing to face the enemy because it is considered a form of ostentation - an excessive trust in one's own power and an underestimation of the enemy which runs counter to the necessary caution.
Moreover, meeting the enemy is one of the most difficult matters, and therefore wishing for it before it actually happens is not appropriate because the result may be different from all expectations.
Wishing for martyrdom does not mean wishing to meet the enemy. This Hadeeth also indicates that challenging to a fight is forbidden, that is why ‘Ali forbade his son from challenging anyone to a duel.
Allaah Knows best.