Defeats for Murray and Ferrer mean that the world's top four have all been eliminated following earlier exits for Novak Djokovic and Roger Federer.
World number five Nadal, who is now the favourite for a third title in the Spanish capital, had to come from a set and a break down to win 4-6, 7-6 (7/3), 6-0 over world number four Ferrer.
And the 11-time Grand Slam champion admitted that recovering a break when Ferrer led 4-2 in the second set was the key moment.
"I was up and down through the whole match and when you are up and down against David it is difficult to win," said Nadal, who had also been two points from defeat in the 12th game of the second set.
"I am very happy and I was lucky to come through at the end of the match. He was very unlucky not to be in the semi-finals.
"At a set and 4-2 down I am not worried, I am very worried."
Despite being seeded above Nadal, due to the seven-time French Open winner's seven-month injury lay-off, Ferrer was still left nursing a record of just four wins in their 22 meetings.
Victory took the 2005 and 2010 Madrid champion's record to 29-2 since he returned to action in early February, and the Spaniard can reach his seventh consecutive final when he faces wildcard Pablo Andujar in another all Spanish affair in the semi-finals.
World number 113 Andujar reached a first Masters semi-final with a 6-3, 7-5 win over Roger Federer's conqueror in the last round, Kei Nishikori.
Third seed Murray though was made to pay for his exertions in beating Gilles Simon over nearly three hours on Thursday as he was soundly beaten by Berdych.
The Czech, who made the final in Madrid last year, edged a tight first set on a tie-break when US Open and Olympic champion Murray floated a backhand wide.
Breaks were then exchanged to start the second, but Berdych struck the crucial blow when he broke for 3-2 and then served out to continue his 100% record against Murray on clay.
And the Scot felt missing his opportunities to take the first set had been symptomatic of his week as a whole.
"It's frustrating, I didn't convert too many opportunities the whole week and managed to dig out a couple of matches the last couple of days, but obviously I couldn't do that tonight so I need to do a better job of taking my chances."
Berdych though was delighted with how he had served against one of the games' best returners and thinks that will again be the key in Saturday's semi-final when he takes on Stanislas Wawrinka.
"When my serve is working my game gets better and better and that is what I need to focus on. The other thing is was even more happy and satisfied with it that Andy looks to attack the second serve and I was able to handle that."
Wawrinka continued his fine form on the clay as he overcame Jo-Wilfred Tsonga 6-2, 6-7(9/11), 6-4.
In the women's event, Williams and Sharapova stayed on course for a battle for the world number one slot in the final as they progressed into the last four with wins over Anabel Medina Garrigues and Kaia Kanepi respectively.
However, current number one Williams was given a huge scare by 30-year-old wildcard Garrigues before battling through 6-3, 0-6, 7-5.
In an uncharacteristically wild performance, Williams racked up nearly 50 unforced errors throughout the nearly two and a quarter hours of play, and she is determined to start afresh when she faces Sara Errani in the semi-finals on Saturday.
"I definitely want to cut back on my unforced errors," said Williams, who conceded a love-set for only the seventh time in her career.
"The fact is I was able to get through it. Tomorrow I start out at 0-0, so it's important for me to let it go and just play a new match tomorrow."
There were far fewer problems for Sharapova as she continued her run of not losing a set so far in the Spanish capital with a comfortable 6-2, 6-4 win over world number 51 Kanepi.
"I was just happy to get past the quarter-finals," said Sharapova who goes on to face Ana Ivanovic for a place in the final.
"I feel like I've been stuck in this tournament so it's nice to be in that stage. I felt like I was facing a really good clay court player today. A lot of her success has come on clay.
"So I was just really determined. I'm happy that I was able to win with that type of scoreline."
Ivanovic sealed her place in the last four with a 6-3, 6-1 win over sixth seed Angelique Kerber, whilst seventh seed Errani ended Ekaterina Makarova's fine tournament, 6-4, 6-3.