Helen was born on 29 January 1750 to blacksmith Andrew Gloag and his wife Ann Kay in the village of Wester Pett, just south of Muthill in Perthshire, and was the eldest of four siblings. Her father remarried after her mother died, but Helen did not have a good relationship with her stepmother, and left home at the age of 19 to take a passage from Greenock to South Carolina. The ship was captured by Barbary corsairs, pirates from Morocco, two weeks into the voyage.
After capture, the men were killed and the women were taken to the slave market in Algiers. Gloag was purchased by a wealthy Moroccan and handed over to Sultan Sidi Mohammid ibn Abdullah. Due to her beauty, red hair, and green eyes, the Sultan added her to his harem. His infatuation toward her resulted in her becoming his fourth wife and eventually 'principal' or favourite wife, and later being given the title of Empress. Her intervention was said to be instrumental in the releases of seafarers and slaves captured by the Salé pirates.
Gloag was able to write home and to receive visits in Morocco from her brother Robert, who was responsible for her story finding its way back to Scotland. She became credited for a reduction in activities of Moroccan-based pirates, though this might also have been because of an increase in the number of British and French warships present due to the increasing tensions before the Napoleonic Wars.
Sultan Sidi Mohammid ibn Abdullah died in 1790 and his throne was seized by Mulai Yazeed, a son of the Sultan and Helen was replaced as Empress by another member of the harem. Yazeed consolidated his hold by killing any possible competition, including Helen's two sons. It is presumed that Helen was also killed during the following two years of unrest.
- The Fourth Queen By Debbie Taylor ISBN 1-4000-5376-5
- Perthshire in history and legend By Archie McKerracher ISBN 0-85976-223-8
- The biographical dictionary of Scottish women By Elizabeth Ewan, Sue Innes, Siân Reynolds, Rose Pipes
- The Thistle and the Crescent By Bashir Maan ISBN 1-906134-14-6
- A Gift for the Sultan by Olga Stringfellow
- Lowson, Stephen (29 May 2009). "Day of history to unfold in Muthill museum". Strathearn Herald. Retrieved 23 June 2009.
- "Helen Gloag: Undiscovered Scotland: The Ultimate Online Guide". Undiscovered Scotland. Archived from the original on 21 October 2007. Retrieved 23 June 2009.
- Bruce, Duncan A. (1998). The Mark of the Scots: Their Astonishing Contributions to History, Science, Democracy, Literature, and the Arts (illustrated, annotated ed.). Citadel Press. p. 182. ISBN 9780806520605.
- Gilchrist, Jim (20 February 2008). "Islam and us". The Scotsman. pp. paragraph 9. Retrieved 23 June 2009.
- Taylor, Debbie (2004). The Fourth Queen (reprint ed.). Random House. ISBN 9781400053766.
- McKerracher, Archie (1988). Perthshire in history and legend. J. Donald. ISBN 9780859762236.
- Elizabeth Ewan, Sue Innes, Siân Reynolds, Rose Pipes (2006). The biographical dictionary of Scottish women. Edinburgh University Press. ISBN 9780748617135.CS1 maint: uses authors parameter (link)
- Maan, Bashir (2008). The Thistle and the Crescent (illustrated ed.). Argyll. ISBN 9781906134143.