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, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
To die while attempting to save the life of a Muslim person is not alone sufficient for one to attain the reward of martyrdom; and this rule applies with greater reason if the person to be saved is a non-Muslim.
But the Muslim will attain martyrdom if he dies in one of the cases which the Sharee‘ah regards the one dying in anyone of them as a martyr, like the one who dies drowning, burning or under ruins, as we have previously clarified in Fatwa 88945.
Hence, if a Muslim dies because of drowning or burning, even during his attempt to save the life of a non-Muslim, then we hope that he will be a martyr, for dying in one of those cases, and on the basis of the fact that "there is a reward for kindness to every living being".
But if he does not die in one of those cases, he is not considered as a martyr. However, Allaah may raise him to the rank of martyrs, depending upon his true intention, and his expecting the reward for that from Allaah The Almighty. The Prophet, sallallaahu ‘alayhi wa sallam, said: “He, who sincerely asks Allaah for martyrdom, Allaah will raise him to the high status of martyrs, even if he dies on his bed.” [Muslim]
Allaah Knows best.