عَنِ ابْنِ عَبَّاسٍ رَضِيَ اللَّهُ عَنْهُ عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ قَالَ: ((لَا تُسَافِرُ امْرَأَةٌ إِلَّا وَمَعَهَا ذُو مَحْرَمٍ))، وَجَاءَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ رَجُلٌ فَقَالَ: إِنِّي اُكْتُتِبْتُ فِي غَزْوَةِ كَذَا وَكَذَا وَامْرَأَتِي حَاجَّةٌ، قَالَ: ((فَارْجِعْ فَحُجَّ مَعَهَا))
It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Noble Prophet (peace and blessings be upon him) said: No woman should travel except with a mahram relative. A man came to the Noble Prophet (peace and blessings be upon him) and said: My name has been registered for such-and-such battle, while my wife is going for Hajj. The Prophet said: Go back and perform Hajj with her.