Studying in a society that does not adhere to Islamic sharee’ah
Question

                I am a young Muslim man. I worship Allaah and I want to act in accordance with the Book of Allaah and the Sunnah of His Messenger (peace and blessings of Allaah be upon him). But the problem is that I live among people most of whom do not pray or fast or pay zakaah. They engage in bid’ah and innovated matters, they swear by things other than Allaah and make vows to others than Allaah. Some people express disbelief (kufr) in Allaah and His Messenger in their words. I am a youth studying in middle school, and most of the students are bad mannered and do not obey the commands of Allaah. There are girls with us who do not wear hijaab, and the female teachers are the same, so that it is too easy to commit evil and haraam actions, and other things that would take too long to explain. But my father will not let me leave school. I want to leave this school and get away from this environment, and work in farming and worship Allaah far away from the evil of people, but my father will not let me do that. I want to ask whether it is permissible for me to leave school. Is it permissible for me to leave this country and move to another, even if my father does not approve? Please advise me, may Allaah reward you with good.
Praise be to Allah.If the situation is as you describe, then you must leave this school and beware of its evil, 
    and keep away from it and its people, in order to protect your religious commitment, belief and morals from these evildoers among the students, 
    male and female, and this bad society. You must do your utmost to move to a safe school or a safe city or a farm or whatever is farthest removed 
    from danger to your religious commitment and morals. This is what you must do, even if your father does not approve, because the Prophet  
    (peace and blessings of Allaah be upon him) said, “Obedience is only with regard to that which is right and proper.” And he  (peace and 
    blessings of Allaah be upon him) also said, “There is no obedience to any created being if it involves disobedience towards the Creator.” Sitting 
    among evildoers, people of shirk and those who do not pray, and sitting among girls who make a wanton display of their beauty and are unveiled 
    poses a serious danger to one's beliefs and morals, so it is not permissible for the Muslim to remain in this situation. Rather he must beware of 
    this society and move away from it to a society that is better and safer for his religious commitment even if he has to travel from one city to 
    another, such as going to Makkah or Madeenah in order to study in al-Masjid al-Haraam or al-Masjid al-Nabawi, because there are teachers there who 
    are people of knowledge, virtue and sound ‘aqeedah, whether his parents approve or not, because obedience to parents is only with regard to that 
    which is right and proper, not in matters of sin and disobedience, as stated above. And Allaah is the One Whose help we seek.