It is permissible to work as a security guard in an hotel, so long as the hotel is not a place where immoral actions are committed openly and the sacred limits of Allaah transgressed, such as zina (adultery), drinking alcohol, and so on, because in that case working there would be a kind of cooperating in sin and transgression, and failing to denounce evil.
The Standing Committee for Issuing Fatwas was asked about someone who works in furnished apartments and rooms, and sees things that anger Allaah, because acts of homosexuality and adultery are committed there, and people drink alcohol and gamble. And they were asked about the ruling on one’s salary in that case.
It is not permissible for you to do this work for one who rents out these furnished rooms and apartments that are used for sin and evil actions, because this is a kind of cooperating in sin and transgression. The wages that you receive for that are haraam for you, because they are given in return for a haraam action. Look for permissible kinds of work, and there are enough halaal jobs that you have no need of anything haraam. Allaah says (interpretation of the meaning):
“And whosoever fears Allaah and keeps his duty to Him, He will make a way for him to get out (from every difficulty).
3. And He will provide him from (sources) he never could imagine”
May Allaah make things easy for your and for every Muslim.
And Allaah is the Source of strength, May Allaah send peace and blessings upon our Prophet Muhammad and upon his family and companions.
Fataawa al-Lajnah al-Daa’imah, 15/110.