Novak Djokovic and Troicki had won Friday's singles for a 2-0 lead before the 2010 champions took an unassailable advantage on Saturday against a Spanish team missing 14-time Grand Slam victor Rafael Nadal who opted to sit out the tie.
Djokovic beat Albert Ramos Vinolas 6-3, 6-4, 6-2 and Troicki followed up to win 6-3, 6-4, 6-3 against Pablo Carreno Busta on an indoor hard court in Belgrade.
Serbia reached the semifinals for the first time in four years, and Troicki won his second point of the quarterfinal against Spain after carrying Zimonjic for the first two sets.
Djokovic won 6-3 6-4 6-2 on Friday.
In Rouen, France also took an unassailable 3-0 lead against Great Britain in their quarter-final.
"I am very happy with my performance today which is very encouraging because I now know I am on the right path to discovering my best form", Djokovic said.
Djokovic led Serbia to their only Davis Cup title in 2010.
Nick Kyrgios was up against fellow big server John Isner in the day's second match-up and the controversial Australian claimed only his second Davis Cup rubber win in straight sets, 7-5 7-6 (7/5) 7-5, to give the hosts a surprise 2-0 lead. On one point, Mahut jumped over the fence to return a smash, and played the next return on top of the front row of spectators.
"France have had so much success in the Davis Cup down the years", Djokovic, who is on a 12-match winning streak in singles rubbers in the competition, told www.daviscup.com.
World number 17 Lucas Pouille, playing as France's number one in the absence of Jo-Wilfried Tsonga and Gael Monfils, beat Kyle Edmund 7-5 7-6 (6) 6-3 before Jeremy Chardy crushed Dan Evans 6-2 6-3 6-3.
British pair Dominic Inglot and Jamie Murray gave up breaks when serving to remain in the third set and match, Benneteau and Mahut running out 7-6 (9-7) 5-7 7-5 7-5 winners to keep their nation's hopes of a first title since 2001 alive. "I now wish my players good results on the ATP Tour and hopefully we will be at full strength in the semifinals".
The winners of the tie will take on either France or Great Britain for a spot in the final.
Belgium was denied by Italy in Charleroi, where Simone Bolelli and Andreas Seppi defeated Ruben Bemelmans and Jons De Loore 4-6, 6-3, 6-4, 3-6, 7-6 (6) in almost four hours.