What Are the Private Sins Muslims Commit in seclusion?
Question

Are envy and thinking about sexual fantasies included in the sins committed when one is alone?
Praise be to Allah.The Danger of Private Thoughts: Avoiding Sin in Solitude
Sexual fantasies are a type of thought that may cross a person’s mind. Whatever a person thinks of to himself, if he does not allow it to take root or persist in thinking about it, is forgivable, according to scholarly agreement.
Passing thoughts are forgivable, but the individual must ward them off and not get carried away in dwelling on them.
It is not permissible for the Muslim to consciously bring such thoughts to mind and become absorbed in dwelling on them, and it is also not permissible for him to let himself get carried away in thinking about things that cross his mind, for that will lead him to what is prohibited.
Envy and Resentment: Sins That Occur in the Heart
Envy is a blameworthy characteristic, and the Muslim should strive to rise above it. Shaykh Ibn `Uthaymin (may Allah have mercy on him) said:
It was said that envy means wishing that Allah takes away that with which He blessed someone else. It was also said that it means resenting that with which Allah has blessed someone else. The former definition is the well-known view among the scholars, and the latter is the view of Shaykh Al-Islam Ibn Taymiyah (may Allah have mercy on him).
Simply resenting that with which Allah has blessed other people is regarded as envy. Envy is prohibited, because the Prophet (blessings and peace of Allah be upon him) forbade it. It is one of the characteristics of the Jews who envy people for what Allah has given them of His bounty, and the harm it causes is extensive. (End quote from Fatawa Nur `ala Ad-Darb, 24/2)
Sins committed in solitude: What are they?
With regard to sins that are committed when one is alone, there is a Hadith which was narrated by Ibn Majah (4245), from Thawban (may Allah be pleased with him), from the Prophet (blessings and peace of Allah be upon him), that he said: “I certainly know people of my Ummah who will come on the Day of Resurrection with good deeds like the mountains of Tihamah, but Allah will make them like scattered dust.” Thawban said: O Messenger of Allah, describe them to us and tell us more, so that we will not become of them unknowingly. He said: “They are your brothers and from your people, worshipping at night as you do, but they will be people who, when they are alone, transgress the sacred limits of Allah.” (Classed as authentic by Al-Albani in Sahih Ibn Majah)
Al-Hafidh Ibn Al-Jawzi (may Allah have mercy on him) said:
Beware of sins, especially the sins committed when one is alone, because audaciously committing sins when you know that Allah is watching will lead to one becoming insignificant in His sight. Tend to your relationship with Him when you are on your own, and Allah will grant you well-being before people. (End quote from Sayd Al-Khatir, p. 207).
What appears to be the case is that this Hadith does not refer to everyone who commits sin when he is alone, because no one can be free of minor sins. The Prophet (blessings and peace of Allah be upon him) said: “Every son of Adam is prone to sin, and the best of those who are prone to sin are those who repent.” (Narrated by At-Tirmidhi, 2499; classed as sound by Al-Albani in Sahih At-Tirmidhi)
What appears to be the case is that this Hadith refers to hypocrites or showoffs, who make a show before people of righteousness and piety, but when they are far from people’s gaze, they show their true colours, so they do not respect the sacred limits of Allah, may He be glorified and exalted.
Ibn Hajar Al-Haytami (may Allah have mercy on him) said:
The three hundred and fifty-sixth sin is: behaving outwardly like righteous people in public, and transgressing the sacred limits, even by committing minor sins, in private. Ibn Majah narrated, with a chain of narration of which the narrators are trustworthy, from Thawban, from the Prophet (blessings and peace of Allah be upon him), that he said: “I certainly know people of my Ummah who will come on the Day of Resurrection with good deeds like the mountains of Tihamah, but Allah will make them like scattered dust…”
Then at the end of the discussion he said:
Note: this explains the apparent meaning of the first Hadith, and that is not far-fetched, even though I have not seen any other scholars quoting it, because the one whose habit is to present himself in a good light in public and commit evil in private will be a cause of great harm and will cause Muslims to be misled, because he has no fear of Allah in his heart. (End quote from Az-Zawajir `an Iqtiraf Al-Kaba’ir, 356)
Based on that, the one who pretends outwardly to love people, but in reality he resents and envies them, is regarded as being among those who commit sin when they are alone.
Similarly, with regard to the one who makes an outward show of being righteous when he is not like that, or he pretends to be a man of dignity and chastity, but when he is alone he brings his corrupt thoughts to mind, there is the fear that the stern warning mentioned in this Hadith will apply to him, which is the loss of his good deeds.
We ask Allah to pardon us and to grant us well-being.
And Allah knows best.