At first, freedom seems like a terrible thing to Mrs. Mallard, who's restricted in lots of ways: through her marriage, by her bad heart, and even inside her home, which she doesn't leave during "The Story of an Hour." On the other hand, though, she has considerable freedoms as an upper-class, married lady. She can tell freedom's coming for her, and she dreads it. Once it arrives, though, it fills her with an overpowering joy. Yet, she experiences this mental and emotional freedom while being confined to a room. As soon as she leaves that room, the freedom she'd only just barely begun to understand is taken away from her.
The moral of the story undermines the famous saying "the truth shall set you free"; Mrs. Mallard finds freedom in the false belief that her husband is dead, and dies when she faces the truth.
By dying at the end of the story, Mrs. Mallard fulfills her earlier fantasies of freeing herself from her humdrum, yet pleasant married life.