Four years ago Stella Abrera danced the lead in “Giselle” for the first time at American Ballet Theater. For her farewell performance with the company, on June 13, she will take on the role again at the Metropolitan Opera House. Her retirement, after 24 years with the company, was announced on Monday.

“It feels like a good time, like the right thing,” Ms. Abrera said in an interview about her decision to retire.

“Giselle” is particularly meaningful to her. When she danced the lead in 2015, she was stepping in for an injured Polina Semionova. It happened to be the company’s alumni night. “About 200 ex-A.B.T. dancers were in the audience, so they all very much knew what was up,” she said. “I had to put all the fears aside and get on that stage and do what I had been dreaming of doing my whole life.”

In his review for The Times, Alastair Macaulay commended Ms. Abrera’s performance. “Some of her dancing was luminous, and all of it was stylish and heartfelt,” he wrote. Her work in Act II received special praise: “She made it clear that dance was a spiritual act.”