Borrowed from French harem, ultimately from Arabic حَرَم (ḥaram). Doublet of haram.
Practice speaking and memorizing "harém" and many other words and sentences in Portuguese.