Dane Wozniacki, who was recently beaten by Serena Williams in the US Open final, took two and a half hours to beat Muguruza 6-4 2-6 6-2.
Third-seed Ivanovic needed to battle from behind against German Angelique Kerber to win 7-5 6-3.
After her victory, former world number one Wozniacki told reporters: "I kept fighting. It was a very competitive match.
"I just tried to stay in there and in the end I think maybe I had a little bit more energy than what she had."
Both Wozniacki and Ivanovic have previously been ranked number one in the world.