The novel opens with the Pontellier family—Léonce, a New Orleans businessman of Louisiana Creole heritage; his wife Edna; and their two sons, Etienne and Raoul—vacationing on Grand Isle at a resort on the Gulf of Mexico managed by Madame Lebrun and her two sons, Robert and Victor.
Edna spends most of her time with her close friend Adèle Ratignolle, who cheerily and boisterously reminds Edna of her duties as a wife and mother. At Grand Isle, Edna eventually forms a connection with Robert Lebrun, a charming, earnest young man who actively seeks Edna's attention and affections. When they fall in love, Robert senses the doomed nature of such a relationship and flees to Mexico under the guise of pursuing a nameless business venture. The narrative focus moves to Edna's shifting emotions as she reconciles her maternal duties with her desire for social freedom and to be with Robert.
When summer vacation ends, the Pontelliers return to New Orleans. Edna gradually reassesses her priorities and takes a more active role in her own happiness. She starts to isolate herself from New Orleans society and to withdraw from some of the duties traditionally associated with motherhood. Léonce eventually talks to a doctor about diagnosing his wife, fearing she is losing her mental faculties. The doctor advises Léonce to let her be and assures him that things will return to normal.
When Léonce prepares to travel to New York City on business, he sends the boys to his mother. Left home alone for an extended period gives Edna physical and emotional room to breathe and reflect on various aspects of her life. While her husband is still away, she moves out of their home and into a small bungalow nearby and begins a dalliance with Alcée Arobin, a persistent suitor with a reputation for being free with his affections. Edna is shown as a sexual being for the first time in the novel, but the affair proves awkward and emotionally fraught.
Edna also reaches out to Mademoiselle Reisz, a gifted recitalist whose playing is renowned but who maintains a generally hermetic existence. Her playing had moved Edna profoundly earlier in the novel, representing what Edna was starting to long for: independence. Mademoiselle Reisz focuses her life on music and herself instead of on society's expectations, acting as a foil to Adèle Ratignolle, who encourages Edna to conform. Reisz is in contact with Robert while he is in Mexico, receiving letters from him regularly. Edna begs her to reveal their contents, which she does, proving to Edna that Robert is thinking about her.
Eventually, Robert returns to New Orleans. At first aloof (and finding excuses not to be near Edna), he eventually confesses his passionate love for her. He admits that the business trip to Mexico was an excuse to escape a relationship that would never work.
Edna is called away to help Adèle with a difficult childbirth. Adèle pleads with Edna to think of what she would be turning her back on if she did not behave appropriately. When Edna returns home, she finds a note from Robert stating that he has left forever, as he loves her too much to shame her by engaging in a relationship with a married woman.
In devastated shock, Edna rushes back to Grand Isle, where she had first met Robert Lebrun. Edna escapes in an ultimate manner by committing suicide, drowning herself in the waters of the Gulf of Mexico.

Question: Why does Robert leave Edna forever?
Answer: Because he does not want to shame Edna by engaging in a relationship with a married woman
Alternative answer: She is married