Salamu Aleykum wa rahmatullahi wa barakatuh, I have already read that it is not allowed for a Muslim to go the gym where it contains freemixing and music. My Situation is that my contract in the gym still has to be payed for more than a half year on monthly basis and I am not able to cancel it. Is it possible for me to visit the gym in the morning hours when there are no women present and to plug-in headphones into my ear to avoid the music? May Allah help all Mumineen to his pleasure. Ameen.
All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
There is no doubt that it is not permissible for a Muslim to go to any place where there is evil unless it is for a valid reason, like denying the evil that the people are doing there and the like. Therefore, it is not permissible for you to go to a gym where there is music. Putting headphones into your ears does not make it permissible for you to go to that gym because of the existence of that evil.
As regards the contract that you have signed with that gym, if you can break it and get your money back, then this is good, otherwise you should seek the reward of Allaah for it and may Allaah compensate you with something better, as whoever leaves something for the sake of Allaah [out of fear of Allaah], Allaah will compensate him with something better. Allaah says (what means): {And whoever fears Allaah - He will make for him a way out. And will provide for him from where he does not expect.} [Quran 65:2-3]
For more benefit on the ruling of gyms that contain mixing and music, please refer to Fatwa 90256.
Allaah Knows best.
You can search for fatwa through many choices