The Ringer actress, who began her career on the recently-cancelled ABC soap in 1992 as Kendall Kane, announced the news during a panel at the Television Critics Association's press tour in Los Angeles this week.
"I can officially confirm that I will be doing a guest spot. When I heard that the show was cancelled I didn't understand. It just doesn't make sense to me," Gellar told reporters at the event.
"So, I called Judy Wilson, who is the casting director and has been since I was there, and I said I wanted to do something."
However, Gellar clarified that she has no interest in returning to her previous role, adding: "I have no idea what I'm going to be doing."
It was recently confirmed that All My Children's final episode will air on Friday, September 23.
All My Children is expected to continue online following its acquisition by media company Prospect Park.