Margaret was born to King Béla IV of Hungary and Maria Laskarina, in the family's flight from the Mongol invasion that devastated Hungary in 1241–42. Her parents had vowed during the catastrophe that if Hungary was spared they would dedicate any future child to God; Margaret, born into that vow, was sent at three to be raised by the Dominican Sisters at Veszprém, and at ten transferred to the new Dominican convent her parents built for her on the Rabbit Island (Nyulak szigete) in the Danube at Buda — afterwards renamed Margaret Island in her honour.
She took the veil at twelve. She refused three royal marriage proposals — to King Ottokar II of Bohemia, King Charles of Anjou of Naples, and a Polish prince — even when the Pope was prepared to grant the necessary dispensation, declaring she would die before breaking her vows. She lived in extreme austerity, performed the convent's lowest tasks, nursed the sick, slept on the bare floor, wore a hair shirt under a rough Dominican habit.
She died at twenty-eight, exhausted by her penances. Her cult was popular from her death; recorded canonisation processes were opened in 1271 and 1276 and confirmed an immense number of healings at her tomb. Bureaucratic complications prevented formal canonisation for centuries; her cultus was confirmed by Pius VI in 1789 and she was at last canonised in the dark year 1943 by Pius XII through equipollent canonization. Her relics were scattered in the Ottoman conquest of 1543; the ruins of her convent are preserved on Margaret Island.

