De Castro was fired earlier this year , garnering $58 million in severance for 15 months of work.
Mayer, speaking live at the TechCrunch Disrupt conference in New York, dodged the question of whether de Castro's hiring was her biggest regret as CEO.
Read More Is Yahoo's brain drain finally slowing?
"I think it was the right time for us to go our separate ways," Mayer said. "There were issues there that I potentially created, and it was important to me to fix them."
Yahoo shares were down more than 6 percent in afternoon trading. On Tuesday China's Alibaba, in which Yahoo owns a huge stake, filed for an initial public offering.
There have been questions about how much of Yahoo's worth is actually tied up in Alibaba, and what will happen to Yahoo when it sells Alibaba shares.