She died of smallpox in 1708, which she contracted from nursing her son through the illness. The relationship between her and her brother, King Carl, was very deep. In July 1709, her brother, who recently had become a refugee of his military catastrophe at Poltava and was far away in Bendery (today in Moldavia) finally received the news of Hedvig Sophia's death in Stockholm the previous December. Carl at first refused to believe it, and this was the only time he was ever known to have wept. It was "an event which I had trusted never to be so unhappy to survive" and he suffered from "that grief which can never altogether leave me until those who have been parted shall meet again". Hedvig Sophia's proper funeral and interment in Riddarholm Church did not take place until 1718, after the death of Carl. She was temporarily interred in 1708, but her permanent funeral was delayed awaiting her brother's orders from how it should be conducted. In 1716, however, she was hastily buried along with her grandmother without him being asked, as they were worried that he would insist on a funeral of a kind which the country could no longer afford.