It may refer to a wall or structure for containment, for example of caged wild animals; or for defence, such as the Serraglio of Villafranca di Verona, a defensive wall built by the Scaligeri.
As if anticipating his two older siblings would survive him, James Merrill dedicated his 1985 collection of poems Late Settings "for my sister Doris and my brother Charles." (His 1957 novel The Seraglio, widely read as a portrait of Charles E. Merrill's womanizing ways, was dedicated to the poet's ten nephews and nieces.) James Merrill shared with his brother a lifelong love of opera, an experience he wrote about in his 1993 memoir, A Different Person.
Freely, John (1999), Inside the Seraglio: Private Lives of the Sultans in Istanbul
Set in Russia during the Russian-Circassian War, the opera was also known under the titles Morte d'amour (Death of Love), La révolte au Sérail (The Revolt in the Seraglio), Alexis, and Faublas.
In chapter 24 the writer provides a detailed description of life at Charlotte Hayes' seraglio (high-class brothel) at King's-Place, St James's (now Pall Mall Place off Pall Mall), and aspects of Hayes' life.