In Friday's earlier quarter-final, Serbia's Djokovic secured a 7-6 (7-2) 6-2 win over Mario Ancic of Croatia.
Ancic had no complaints afterwards and instead preferred to look back on his run in the tournament.
Ancic and Ljubicic finally converted the second of two match points at 5-4 up to clinch victory.
But after 16 thrilling minutes - only four minutes less than the entire first set - Ancic held.
The American came through 6-4 6-4 to set up a meeting with either Nicolas Massu, Mario Ancic or Raemon Sluiter.
The British number one's loss to Mario Ancic in Miami means he drops nine places to 22nd in the world rankings.
Mario Ancic and Ivan Ljubicic beat Dmitry Tursunov and Igor Andreev 6-2 4-6 7-6 3-6 6-4 to give Croatia a 2-1 lead against Russia.
There were fears that the Briton was suffering from glandular fever, something that has hit both Roger Federer and Mario Ancic in recent years.
The world number three took time to shake off the rust on Tuesday against a player who had beaten Mario Ancic in the first round.
Ancic, famously, was the last man to beat Federer at Wimbledon.
Ancic, who had played 14 sets in his previous three matches, put up a better fight in the second set but dropped serve crucially at 5-5.
Ancic appeared refreshed after another rain delay but his second double fault came just at the wrong time, allowing Federer to break for a 6-5 lead.
Roddick however was given a tough passage to the later stages with a possible second round match against either German Tommy Haas or Croatian Mario Ancic .
In other men's singles action, Magnus Norman of Sweden beat Switzerland's George Bastl 6-3 6-0 and Swede Magnus Larsson defeated Mario Ancic of Croatia 7-6 (7-4) 6-2.
Since then, Federer has beaten Ancic five times in a row, racked up five straight Wimbledon titles and won 63 - now 64 - successive matches on grass.
Together with Mario Ancic, Goran Ivanisevic and Ivo Karlovic, Ljubicic was part of Croatia's victorious 2005 Davis Cup team, becoming the only unseeded country to win the event.
In the first quarter-final, Djokovic became the first player to take a set off unseeded Croatian Ancic in the tournament when he claimed the hard-fought opener on a tie-break.
After the Croatians raced through the first set, twice breaking Tursunov's serve, the Russians quickly began to gel and broke a nervy Ancic twice to take the second set.
So Ancic's chances of repeating that famous win were already slim and were not helped by a leg injury and an energy-sapping five-set match against Fernando Verdasco in the previous round.
Ancic, who lost the tie's opening match against Nikolay Davydenko on Friday, will play Youzhny in a potential fifth rubber decider on Sunday, although Ljubicic can secure victory by beating Davydenko.
The dramatic 3-2 victory over Slovakia sparked wild celebrations in Zagreb's main square and followed on from a bronze medal he and Ancic won in the doubles at the Athens Olympics the previous summer.
Ancic, who made the last four at Wimbledon in 2004, missed the last seven months of last year and he began work in a law firm as doubts over his future in tennis grew.
The top seed - still yet to drop a set in the tournament - will face Marat Safin or Feliciano Lopez in Friday's semi-final, and neither will hold much fear after a supreme display against Ancic.
应用推荐