Moya will play Paul-Henri Mathieu in Friday's quarter-finals after the Frenchman thrashed Tomas Cakl 6-1, 6-1.
Also through to the quarter-finals are fourth seed Tommy Robredo who defeated countryman Santiago Ventura 7-5, 6-0, and experienced Italian Davide Sanguinetti, a 5-7, 6-3, 6-4 winner over Spain's Albert Costa.
The Moya-Ferrero contest was the match everyone was looking forward to from the moment the draw was made and it lived up to its billing.
The two former world number ones and French Open champions traded blows and counter-punches for two hours 48 minutes.
"All the matches we have played against each other have been very tough fights," said Moya who still trails Ferrero 7-4 in head-to-heads and 4-2 on clay.
Moya won the first set thanks to a lucky net-cord and had three match points in the second set before Ferrero battled back to force a decider.
"I knew he was playing better than I was and I expected this kind of tough match," Moya added. "I could have won in straight sets but didn't, but mentally I think I was strong today and I was very consistent."
Ferrero rued missed chances in the opening two sets where three times he broke Moya's serve only to be broken back.
"The key for me was not doing anything with my chances in the first and second sets because I had a break in the first but lost and had two breaks in the second but didn't win it until the tiebreak."
In the women's draw, second seed Dinara Safina stormed into the quarter-finals by beating Katerina Bondarenko 6-2, 6-2.
Mariana Diaz-Oliva beat Olga Savchuk 6-2, 6-3, American Jill Craybas overcame Ludmila Cervanova 6-4 6-1 and Lucie Safarova defeated Michaella Krajicek 3-6, 7-6, 7-5 to complete Friday's quarter-final line-up.