Sixth seed Ferrer, who had beaten 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 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 in the quarter-finals.
Former world number one Roger Federer, seeded fourth, got off to a sluggish start but saw off local favourite Jo-Wilfried Tsonga 2-6 7-6(6) 6-1 to set up a meeting with second seed Djokovic who rallied to beat unheralded Spaniard Guillermo Garcia Lopez 4-6 6-3 6-1.
Swiss Federer made a series of backhand errors as Tsonga pinned him behind the baseline with his flat forehand, but regained composure in the tiebreak of the second set.
Tsonga's limited fitness was exposed as he lost five games in a row and Federer finally converted a break point at the 16th attempt as he marched into the last four.
Djokovic, looking to achieve an unprecedented Indian Wells-Miami-Monte Carlo treble, was broken twice in succession in the opening set by Garcia Lopez and faced three more break points in the second.
But the Serb saved them all and took the Spaniard's serve to open a 5-3 as he claimed seven games in a row.
Federer leads Djokovic 17-16 in their head-to-head record and they have won a match each this year, Federer prevailing in the Dubai Championship semi-finals and Djokovic taking his revenge in the Indian Wells final.
Ferrer ended a long wait against Nadal, having never beaten him on clay since their first ATP meeting in Stuttgart.
"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."
Nadal said he did not stick to his own game plan.
"I didn't play the right way. I didn't play with the right intensity with my forehand," he said.
"I played too short. I gave him the chance to have the control of the point almost all the time."
Ferrer broke 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 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.
Swiss Wawrinka, who did not play on Thursday because his third-round opponent Nicolas Almagro withdrew due to injury, got off to a slow start against Raonic, needing a tiebreak to pocket the first set.
He was then unstoppable, outclassing the Canadian who showed his limitations at the highest level.
- Sports & Recreation
- Novak Djokovic
- Roger Federer