Mishkat al-Masabih
Abu Huraira reported God’s messenger as saying, “If anyone goes out to perform hajj or 'umra, or to fight with infidels, and dies on the way, God will record for him the reward of him who fights with infidels, him who performs the hajj and him who performs the 'umra.” Baihaqi transmitted it in Shu'ab al-iman.
وَعَنْ أَبِي هُرَيْرَةَ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَنْ خَرَجَ حَاجًّا أَوْ مُعْتَمِرًا أَوْ غَازِيًا ثُمَّ مَاتَ فِي طَرِيقِهِ كَتَبَ اللَّهُ لَهُ أَجْرَ الْغَازِي وَالْحَاجِّ والمعتمِرِ» . رَوَاهُ الْبَيْهَقِيُّ فِي شُعَبِ الْإِيمَانِ
Reference