How to Stop Looking at Porn
Question

I feel embarrassed to pose this question: 
I consider myself to be a good Muslim. I am a young man aged 20, I pray the five daily prayers and fast in Ramadan, and I help those who need my help. I also make da’wah to non-Muslims and tell them about Islam. But I feel like a hypocrite because of my sins. I fear Allah a great deal and I respect the Qur’an and hadeeth, but despite that I cannot stop myself from committing sin.
 
I am addicted to looking at pornographic pictures, even though I know this is haram. I cannot stop myself. I have tried so much but every time I stop, I go back to it again, and every time I go back to it, it is harder to give it up than the time before. What should I do?
Is there any sound way I can deal with this matter according to the teachings of the Qur’an and hadeeth? 
I am sure that I can give it up, but what should I do so that my faith and willpower will be strong enough to resist this temptation? I fear Allah a great deal and I need help.
Praise be to Allah.We appreciate your confidence in us, and we ask Allah to make us and you steadfast, and to show us the truth as truth and help us to follow it, and to show us falsehood as false and help us to avoid it, and not let it confuse us and lead us astray. 
My brother in Islam, we can sense from your words that you are very distressed, and that you feel that you are doing wrong. In sha Allah, this is a sign of sincerity, and the beginning of repentance, by Allah’s Leave. 
Each one among us needs to re-examine his situation and sincerely resolve to start to strive against his own self which enjoins him to do evil, and to arm himself with certain weapons in this struggle. 
Useful tips on how to quit sins
We will give you some advice through which we ask Allah to benefit us and you: 

Pray to Allah and beseech Him, and know that Allah does not let down the one who calls upon Him. Allah says (interpretation of the meaning): 

“And your Lord said: ‘Invoke Me [i.e. believe in My Oneness (Islamic Monotheism) and ask Me for anything] I will respond to your (invocation). Verily, those who scorn My worship [i.e. do not invoke Me, and do not believe in My Oneness, (Islamic Monotheism)] they will surely enter Hell in humiliation!’” [Ghafir 40:60] 
Persist in calling upon Allah and making du’a to Him, and seek the times when du’a is most likely to be answered, in sujud, after praying, in the last hour of the day on Friday, and in the last third of the night when our Lord comes down to the lowest heaven and says. “Where is the one who calls upon Me, that I may answer him, where is the one who seeks My forgiveness, that I may forgive him? You should not feel that there is no response, for Allah is always near and responds to the call of the one who is distressed if he calls upon Him, and He relieves him of his distress.  

Each person must strive to do more acts of worship. Allah says (interpretation of the meaning): 

“Verily, the good deeds remove the evil deeds.” [Hud 11:114]
And he should focus on prayer in particular. Allah says (interpretation of the meaning): 
“Verily, As-Salah (the prayer) prevents from Al-Fahsha (i.e. great sins of every kind, unlawful sexual intercourse) and Al-Munkar (i.e. disbelief, polytheism, and every kind of evil wicked deed).” [al-'Ankabut 29:45]

Each person must strive to increase his knowledge of Allah, by studying His names and attributes, and by thinking of the creation of the heavens and the earth. Then he will feel shy before Allah. As one of the salaf said: Do not look at the smallness of the sin, rather look at the greatness of the One Whom you have disobeyed. 


You should know that the way to Paradise is difficult and needs effort and patience. Allah says (interpretation of the meaning): 

“As for those who strive hard in Us (Our Cause), We will surely guide them to Our paths (i.e. Allah’s religion — Islamic Monotheism). And verily, Allah is with the Muhsinun (good-doers).” [al-'Ankabut 29:69]

Think about the benefits of lowering your gaze , and this will motivate you to quit looking at pornographic pictures and  will enable you to ignore the evil ideas that cross your mind and the whispers of the Shaytan. 

Benefits of lowering the gaze
There follow some of its benefits , which we list for you in the hope that Allah may benefit us and you thereby: 

Lowering the gaze is obedience to the command of Allah (interpretation of the meaning): “Tell the believing men to lower their gaze (from looking at forbidden things)” [al-Nur 24:30], and obeying the command of Allah brings ultimate happiness to a person in this world and in the Hereafter.
It purifies the heart and soul and actions.
It prevents the poisoned arrows from reaching you, for a look is one of the poisoned arrows of Iblis.
The one who lowers his gaze is compensated with the sweetness of faith in his heart.
He gains sound insight through which he can distinguish truth from falsehood.
He will rid his heart of the pain of feeling that one is missing out, for whoever looks without restraining his glance will always feel that he is missing out.
His heart will be filled with happiness, joy and light that is greater than any pleasure that may be gained by looking.
His will free his heart of the control of desire, for the one who is controlled by his whims and desires is indeed a prisoner.
Lowering the gaze strengthens the mind and increases wisdom, whereas letting the gaze wander freely only makes one foolish and heedless of consequences


 We advise you to read the book al-Da wa’l-Dawa by Ibn Al-Qayyim, which is a very useful book. 

We ask Allah to protect us and you from being led astray, and to enable us and you to do righteous deeds. May Allah send blessings upon our Prophet Muhammad and upon all his family and Companions. 
And Allah knows best.
For more, please see these answers: 166123 , 8861 , and 210259