Marthe-Marguerite le Valois de Villette de Mursay was the daughter of Philippe, marquis de Villette de Mursay and his wife Marie-Anne de Chateauneuf. Her father was a cousin of Madame de Maintenon, the secret second wife of King Louis XIV, who obtained custody of Marthe-Marguerite because of her family's Huguenot faith (the same thing had happened to Madame de Maintenon in childhood). She was raised as a Roman Catholic at the court of Versailles by Madame de Maintenon, who treated her as a daughter. In 1686, she married Aimé-Jean-Anne de Tubières, marquis de Caylus, a nobleman serving in the household of the dauphin Louis. The marriage was not a happy one, and the young marquise had an affair with the duc de Villeroy which, when exposed in 1695, caused her dismissal from court. When her husband was killed in battle 10 years later, Madame de Caylus was forgiven by the king and allowed to return to Versailles. She wrote a biography of Madame de Maintenon and valuable memoirs of her time at the French court. The memoirs were edited by Voltaire in 1770 and later by others in the 19th century. Madame de Caylus was the mother of Anne-Claude-Philippe, comte de Caylus, who became a noted archaeologist and man of letters.