Surah Yusuf has been called ‘Ahsan-ul-Qasas’ (The Best Story). It was revealed to Prophet Muhammad (PBUH) when he was going through the toughest phase of his life, having lost his beloved wife and uncle. So Allah revealed Surah Yusuf to console and comfort him.
Life Lessons From Surah Yusuf of The Quran
This Surah tells us about the life of Prophet Yusuf (AS). When he was young, his brothers threw him in a well out of jealousy because they thought that their father loved Yusuf (AS) more than them. But Allah helped him and He was taken out of the well by some people who were passing from there. They sold Yusuf (AS) to the Finance Minister of Egypt.
Then came another grave trial for Yusuf (AS), the Mistress (wife of the Minister) tried to seduce him, she called Yusuf in her room and asked her servant to bolt the doors from outside. And called him to herself but Yusuf (AS) had the fear of his Lord, he forbade himself from doing this sin, and tried to run away. But the mistress chased him and tore his shirt from the back. As they reached to the gate, the Minister arrived and the mistress put the blame on Yusuf (AS). But Allah guided one of her household and he said if the shirt is torn from chest then she is right and if it is torn from the back then Yusuf (AS) is innocent. Thus Yusuf (AS) was proved innocent. Some other women also tried to convince him to obey his mistress, so Yusuf (AS) made Dua to Allah that he’d rather be in prison than to accept what they were calling him to. Allah accepted his dua and Yusuf remained in prison for several years. Some time later, the king saw a dream and no one was able to tell the meaning of it, Yusuf (AS) was the one who did it by the Will of Allah and the knowledge granted by Him to Yusuf. The king was happy with Yusuf (AS) and set him free. Yusuf earned a high status in Egypt. Later he was reunited with his father.
The story of Yusuf (AS) teaches us many lessons which can change our lives for good.
The Lesson of Sabr
Sabr means patience. When the brothers of Yusuf came back and told their father Yaqub (AS), that a wolf had eaten him and showed him the clothes of Yusuf (AS), he knew that they were lying but he was patient and left it to Allah; and indeed Allah is with the ones who are patient. From this, we learn that whenever any calamity strikes us, we need to be patient because Allah has destined it and He always wills the best for His slaves.
Being patient is not easy, it is tiring but the reward is worth it. Sabr strengthens our Imaan. It teaches us to be thankful to Allah in every situation, be it good or bad.
Narrated Anas (RA), the Prophet (PBUH) said, 
The real patience is at the first stroke of a calamity.
The Lesson of Tawakkul
Yaqub (AS) had strong Tawakkul that Allah will reunite him with Yusuf (AS) and Yusuf had Tawakkul that His Lord will prove his innocence and take him out of the prison.
Tawakkul is when you are shattered from inside but you still choose to trust the Plan of Allah. It should be a part of the life of every Mu’min (believer). Because Allah loves it when His slaves trust Him and He helps them and honours them. Tawakkul is a quality that keeps you going in your rough times, trusting that Allah will take care of everything and that He is in control of the situation.
We should always rely only on Allah because He is the Provider, the Most Merciful. He will neither betray us nor leave us. He will always be there for us. And when we rely on Allah, then we need no one else because He is Sufficient for all our affairs. We should never lose hope just because things in our lives aren’t going our way, we should remember that they are going according to the Will of Allah, the Best of planners, and He knows what is best for us while we do not know.
As Allah says in the Quran: 
And put your trust in Allah, for Allah is Sufficient as a trustee of affairs.
Complaining Only to Allah
The story of Yusuf (AS) also teaches us to only complain of our grief and sorrow to Allah and no one else.
Yusuf (AS) only turned to Allah to complain of his grief and to ask for help. Yaqub (AS), knowing that his sons had done something wrong with Yusuf, did not complain to them, but to Allah. This shows that no matter how much we complain to people about our grief and sorrow, it will all be in vain because they aren’t capable of helping us. But if we complain about it to our Creator who is indeed capable of doing anything, He will surely remove all our grief and pain.
When we complain of our grief only to Allah, He responds to us in ways that we cannot even imagine. Complaining only to Allah shows that we rely fully on Him and we seek help only from Him. So whenever you are stuck in any problem, talk about it only to Allah, He is your real friend, the one who is always ready to help you and never gets tired of listening to you.
I only complain of my suffering and my grief to Allah, and I know from Allah that which you do not know. 
Having Fear of Allah
When the mistress called Yusuf (AS) towards wrong, He had the fear of Allah in his heart, so he stopped himself from falling into that sin. Allah loves His slaves who fear Him and He has prepared gardens for them wherein they will dwell forever. Today we are surrounded by a lot of fitnah, so it is very important for us to fear Allah in order to save ourselves from falling into the traps of shaytan and sinning.
If you fear Allah than you fear nothing and no one else. One who fears Allah will always be on the right path and will be successful in this world and the Hereafter. It is the fear of Allah that will save us from sinning. When you fear Him, you will not hurt anyone, and you will try to be away from every sin that will take you away from Him. You will lead a life pleasing Allah if you fear Him. As Allah tells us in the Quran: 
O you who have believed, fear Allah as He should be feared and do not die except as Muslims.
The story of Yusuf (AS) teaches us to connect with Allah in times of difficulty, and tells us how miraculously Allah helps His slaves. It describes the beautiful relation of Yaqub (AS) and his son Yusuf (AS); Yaqub grieved for his son for 40 years, to such an extent that he lost his eyesight. When Yusuf (AS) was defamed by the mistress, Allah proved his innocence, and established Yusuf (AS) in Egypt and raised his status.
We should always give precedence to what Allah wants over what the soul inclines us to in order to please Him and be successful in Dunya and Akhirah.
- Sahih al-Bukhari : 1302
- Surah al-Ahzab : 3
- Surah Yusuf : 86
- Surah ali ‘Imran : 102