Serbia’s Novak Djokovic awaits Murray in the last four. Roger Federer, hoping to add a singles gold to his 17 Grand Slam titles, will take on Argentina's Juan Martin Del Potro in the second semi after the Swiss top seed knocked out American John Isner 6-4 7-6.
On Court One, where the Duke and Duchess of Cambridge commanded more of the press photographers' attention than the match, third seed Murray took a 4-3 lead before powering four aces in a row to force Almagro to serve to stay in the set.
The Spaniard held his nerve for one more game, before sending a forehand long to give his opponent the set.
The royals quickly got into the spirit of things, taking part in a Mexican wave which rippled round the crowd several times as 11th-seeded Almagro received medical treatment on his arm and shoulder.
When business got back underway Murray broke in the first game of the second set, dropping just one game before wrapping up the victory.
Murray, who is close to his second final at Wimbledon in the space of four weeks, felt he dealt with the conditions well – including Almagro’s injury and the arrival of the royals.
He said: “You try not to change too much. I think that's one of the most important things. You need to try and stick to the tactics you had when you came out on court.
“It's difficult but it's something with experience and age you learn to deal with.
"The crowd make a lot of noise when they come out. It's great for tennis when you get people like that coming to watch. They were here during Wimbledon as well so it's good fun."
Number two seed Djokovic, who won singles bronze in Beijing, defeated France's Jo-Wilfried Tsonga 6-1 7-5.
The Serbian sped to an early lead against the exhausted Frenchman, who had played both doubles and singles on Wednesday after clocking up the longest three-set match in Olympic history a day earlier, dropping just one game before wrapping up the first set with an ace.
"Today I was a bit tired so it was mission impossible," Tsonga told reporters.
He mustered enough energy to put up more of a fight in the second set, breaking the 25-year-old to go 3-1 up. But Tsonga threw away the opportunity to break a second time and the five-times grand slam winner levelled.
Serving for the match, Djokovic secured the win with an unreturnable serve.
"It was a great win for me. Tsonga is a great competitor and he is a very powerful player from the baseline so, for me, the right thing to do today was use my serve as efficiently as possible in these windy, tough conditions," Djokovic said.
"Andy is the home hero," said Djokovic of his opponent who reached the Wimbledon final this year.
"He has been playing better than ever on grass courts. I will have to be at the top of my game."
Later on Centre Court, Isner gave Switzerland's Federer a run for his money, holding the world number one 4-4 before powering a smash shot out to hand his opponent the lead.
After throwing his hat on the floor in frustration and burying his face in a towel as he sat down at the change of ends, the tall American came back fighting but despite getting a break point he couldn't follow through and Federer took the set.
The second set went to a tie break, with Federer holding up his hands in apology as he snatched victory with a cheeky shot which bounced off the top of the net.
Federer, who will not get to repeat his Beijing doubles win after he and partner Stanislas Wawrinka were ousted by Israel's Jonathan Erlich and Andy Ram on Wednesday, will face eighth seed Del Potro for a place in the final.
- Related links