His father, the future landgrave (who reigned from 1760 and died in 1785), left the family in 1747 and converted to Catholicism in 1749.
In 1756, Mary moved to Denmark, to take care of the underage children of her sister, Queen Louise of Denmark, who had died in 1751.