Sixth seed Ferrer, who had beaten Rafael Nadal on clay only once 10 years ago and was brushed aside by the muscular left-hander in the French Open final last year, relied on his devastating forehand to prevail in over two hours.
Nadal, who made an uncharacteristic string of unforced errors, was looking to recapture his Monte Carlo crown after Serb Novak Djokovic had ended his eight-year reign in last year's final - his last defeat on the slow surface.
Ferrer will next face world number three and Australian Open champion Stanislas Wawrinka, who dismissed Canadian eighth seed Milos Raonic 7-6(5) 6-2.
"I have had to wait 10 years to beat him on clay. It was a long wait but I am pleased with the win and the way I played," Ferrer told Spanish TV.
"I spoke with my coach and we had a clear gameplan but with Rafa it's always tough because he doesn't allow you to follow it. The good thing was I was able to deal with his attacks and stay strong physically for the whole match."
Ferrer broke Rafael Nadal's serve in the second game, only for the top seed to break back in the third after a 16-minute dogfight in overcast conditions at the Monte Carlo Country Club.
Ferrer saw off a potentially decisive break point in the 11th game and the opening set went to a tiebreak, which he won 7-1 as Nadal collapsed.
Nadal continued to struggle in the second set, with a weak drop shot being easily retrieved by Ferrer as he broke for 2-1.
The world number six stole Rafael Nadal's serve again for 5-2 as the clock ticked past the two-hour mark.
Nadal broke back for 5-3 and held for 5-4 but bowed out on the first match point when he netted a routine backhand.
Earlier, Swiss Wawrinka, who did not play on Thursday because his third-round opponent Nicolas Almagro of Spain had withdrawn injured, got off to a slow start against Raonic, needing a tiebreak to pocket the first set.
He was then unstoppable, outpacing the Canadian who showed his limits at the highest level.
Later on Friday, former world number one Roger Federer takes on local favourite Jo-Wilfried Tsonga and Djokovic is up against unheralded Spaniard Guillermo Garcia Lopez.