Almagro had lost all 12 previous meetings with his Spanish compatriot before today and the mental baggage was apparent when he failed to serve out the match three times - once in the third set and then twice in the fourth.
By the fifth, Almagro was a psychological wreck and it was no surprise that Ferrer duly completed a gutsy 4-6 4-6 7-5 7-6 (7/4) 6-2 victory in three hours and 44 minutes to set up a last-four clash with the winner of today's match between Novak Djokovic and Tomas Berdych.
"It was a miracle that I won this match," Ferrer said.
"Nicolas had a lot of chances to beat me but I tried to fight for every point - that is my game. I will always try to fight and do my best.
"In the important moments all the players get nervous, it has also happened to me."
Ferrer, one of the most dogged competitors on tour, played his usual steady game but was simply outplayed by the 10th seed for at least two thirds of an absorbing contest.
The pair share similar styles but Almagro's extra power, especially on the backhand side, consistently gave him the edge.
He was also ruthless when opportunities came his way, breaking once in each of the first three sets at the first opportunity to take him to the brink of victory, serving at two sets and 5-4 up.
It was shaping up to be a landmark performance and result for Almagro, who had never before reached the semi-finals of a grand slam, but then he realised what he was about to achieve and buckled horribly.
Ferrer did nothing special to get to 15-40 and although Almagro got it back to deuce he was powerless when Ferrer converted a third chance.
Almagro's composure was shot and it was no surprise when Ferrer broke again to claim the set and get himself back in the contest.
The fourth was error-ridden. Almagro was still the more aggressive player but continued to struggle when it really mattered.
He twice claimed and then relinquished a break early on but when he earned a third he had another chance to serve it out at 5-4.
But he could not get over the line as Ferrer seized on his jitters to level.
To his credit, Almagro hit straight back, winning a long game on his sixth break point.
But, for a third time, his nerves betrayed him at 6-5 as Ferrer took it into a tie-break and there was a sense of inevitability when he took it 7-4.
By now Almagro was also struggling with a groin injury suffered during the breaker and he had to undergo treatment before the decider got underway.
Ferrer was, in comparison, looking stronger than he had at any stage of the match and it was no surprise when he completed a wonderful comeback to progress through to the last four of a major for a fifth time.
Li Na made it through to her third women's Australian Open semi-final after halting Agnieszka Radwanska's blistering start to 2013.
Radwanska came into the match having won 13 straight matches, a run which included title wins in Auckland and Sydney, but she had no answer to Li's all-or-nothing game.
The Chinese won 7-5 6-3 despite making 40 unforced errors to advance to a last-four clash with Maria Sharapova.
Second seed Sharapova was in scintillating form as she overcame Ekaterina Makarova.
After winning the first set 6-2 in just 31 minutes, Sharapova took the second by the same scoreline to confirm her semi-final berth.