The Australian-born royal looked demure in a midnight-hued gown adorned with soft pink flowers to commemorate fallen Danish soldiers.
Mary’s calf-length ensemble was accessorised with a simple belt and nude shoes – as well as a wide brimmed hat.
Her appearance on Wednesday came as the Palace confirmed Prince Frederik had undergone surgery for an issue with his back.
The procedure had gone according to plan, the palace said on Monday.
Crown Prince Frederik has since been discharged from hospital and will spend time recovering.
Since 2011, the Flag day ceremony in Copenhagen has been attended by both Mary and Prince Frederik, but this time Mary went without her husband who was forced to cancel due to his recent hospitalisation.
First taking part in a wreath-laying ceremony, the princess then reviewed troops on Thorvaldsen’s Square before attending a church service.