Chopin is being ironic here. The reader knows that Louise Mallard is actually feeling liberated by the news of her husband's passing; however, the other characters in the short story have no idea. Her actions in that hour are considered to be ones filled with grief, not ecstasy. Therefore, when Louise finds out that her husband is alive and well, she is so shocked (or perhaps heart broken) that she dies. Because no one knows her true feelings, they assume that Louise has died because she is so shocked and overjoyed that her husband is actually alive.
At the end of "The Story of an Hour," Louise Mallard discovers that her husband is, in fact, alive, and the feelings of freedom she had been discovering were in service of nothing. She is described at the beginning as having "heart trouble," and the shock of this discovery is what kills her; however, the interpretation of the actual shock may differ:
[Her husband] had been far from the scene of the accident, and did not even know there had been one. He stood amazed at Josephine's piercing cry; at Richards' quick motion to screen him from the view of his wife.
When the doctors came they said she had died of heart disease -- of the joy that kills.
(Chopin, "The Story of an Hour," vcu.edu)
The doctors interpret her heart failure as one of "joy," the idea being that the strain of sudden grief and then sudden relief was simply too much for her heart. In this scenario, the joy of seeing her husband alive stopped her heart because of her weakened state.
The usual objective interpretation is that her real "joy" was taken away from her by her husband's appearance. During the hour that she thought him dead, she began to discover the possibilities of personal freedom, and of living life without her husband -- who is not a bad person -- shadowing her every move. In this interpretation, "the joy that kills" is her realization that she is not free, might never be free, and so her brief moment of true freedom and joy has been stolen from her. With her heart trouble, the powerful disappointment -- as well as the legitimate shock -- of discovering her husband alive is enough to cause heart failure.
Kate Chopin’s “The Story of an Hour”: A Feminist Reading
There are many forms of oppression in “The Story of an Hour” by Kate Chopin. Not only does
Louise Mallard suffer in her medical and marital conditions, but she also poses a threat to
herself, as her sister Josephine warns. This danger is particularly noticeable, since all of the
action in the story revolves around Louise Mallard’s preservation. Everything is orchestrated to
save her from any sudden and/or extreme distress. In the end, the equilibrium of her situation is
what survives: Brently Mallard’s return signals the return of her oppressive condition and
ensures that Louise Mallard will experience no more than a momentary change in her situation.
It is this unchanging prospect––the preservation of her oppressive condition––that proves Louise
Mallard, or rather her circumstances, fatal to herself.