What Happens If You Die in a State of Janabah?
Question

What is the ruling on one who dies in a state of Janabah?
Praise be to Allah.What happens if you die in a state of Janabah?
If a person dies in a state of Janabah, that does not mean that he was weak in religious commitment or met a bad end, so long as he became Junub for a permissible reason, such as intercourse with his wife or an erotic dream. 
Handhalah (may Allah be pleased with him) was martyred when he was Junub, and the angels washed him. His story is well known and was narrated by Ibn Is-haq and others (may Allah have mercy on them), as Ibn Hajar (may Allah have mercy on him) said in Fath Al-Bari. 
At-Tabarani (may Allah have mercy on him) narrated from Ibn ‘Abbas (may Allah be pleased with him) that Hamzah (may Allah be pleased with him) was martyred when he was Junub. Ibn Hajar (may Allah have mercy on him) said: “There is nothing wrong with its chain of transmission.” 
How to wash someone who died in a state of Janabah
If a man dies in a state of Janabah, or a woman dies when she is menstruating, he or she should be given Ghusl (washing of the deceased) only once . The Ghusl for the deceased also suffices for the Ghusl from Janabah or menses. 
This is because there are two reasons for Ghusl at the same time: Janabah or menses, and death. So one Ghusl is sufficient for both, just as if there is more than one reason for Wudu, such as passing wind and urinating, or sleeping deeply, then one Wudu is sufficient for all of them. (See Kashshaf Al-Qina`, 2/87) 
An-Nawawi (may Allah have mercy on him) said in Al-Majmu` (5/123): “Our view is that if a person who is Junub or menstruating dies, they should be given one Ghusl. This is the view of all the scholars except Al-Hasan Al-Basri who said: They should be given two Ghusl. Ibn Al-Mundhir said: ‘No one else suggested this.’”
For more details, please see the following answers: 8828 , 6533 , and 20847 .
And Allah knows best.