Reference: Fataawa al-Lajnah ad-Daa.imah lil-Buhooth al-‘Ilmiyyah wal-Iftaa. – Volume 11, Page 16, Fatwa No.2177
Question: A woman performed the Hajj whilst she was pregnant. When she returned from the Hajj, her [unborn] child died. So, will she and her child be rewarded for that Hajj?
Response: Only the woman will be rewarded for the Hajj. As for her child, then there is no Hajj for him.
And with Allaah lies all the success, and may Allaah send prayers and salutations upon our Prophet Muhammad (sal-Allaahu ‘alayhi wa sallam) and his family and his companions.