Daughter of Alfonso d'Este III, Duke of Modena, she was born in Modena, Italy and christened Maria Beatrice Eleanor Anne Margaret Isabella. She married James, then Duke of York in 1673. He had two daughters Mary and Anne, from his first marriage to Anne Hyde, a Protestant.
Mary of Modena, however, was a Roman Catholic, as was James himself. Their first child was stillborn (1674), and numerous others died in infancy. However, following James's accession to the throne, the question of whether Mary would ever bear a son became more significant, because such a child would be brought up in the Catholic faith and would be heir to the throne.
In 1688, Mary finally gave birth to a living son, James. The event caused much speculation. It was suggested that the child had been born dead and a changeling smuggled into the room in a warming-pan in order to conceal the death. It is unlikely that there was any truth in this rumour.
Within a few months, the king and queen had fled the country and James's elder daughter, Mary, with her husband, William of Orange, had taken the throne. In exile, Mary of Modena gave birth to one more child, Princess Louisa, who lived to the age of nineteen. Mary of Modena died in Paris of cancer. Her tomb, in the abbey of Chaillot, was destroyed during the French Revolution.