She was the daughter of William Alexander Anthony Archibald Douglas-Hamilton, 11th Duke of Hamilton and of his wife, Princess Marie Amelie Elizabeth Caroline of Baden.
Mary married twice. Her first marriage, on 21 September 1869, was to Prince Albert I of Monaco. They were divorced on 28 July 1880. They are great-grandparents of the current prince, Rainier III of Monaco. Her second marriage, on 2 June 1880, was to Tassilo, Count Festetics von Tolna. They are great grandparents of Princess Virginia Carolina Theresa Pancrazia Galdina von Fürstenberg, known as Ira von Fürstenberg.