© Getty Images
Fiorentina started well and could have taken the lead on aggregate when Mario Gomez earned himself some space but his powerful effort flew inches wide of the target.
Both sides looked dangerous in an entertaining first half, with the home supporters being left frustrated again when Josip Ilicic fired a good chance over the crossbar from the edge of the box.
Juventus started to apply more pressure in the early stages of the second half and they should have taken the lead in the 59th minute when Mauricio Isla picked out Arturo Vidal, who could only head over the crossbar.
A dramatic couple of minutes handed the advantage to Juventus, with the first twist coming when Gonzalo Rodriguez was sent off for a second bookable offence after fouling Fernando Llorente on the edge of the box.
Pirlo stepped up to take the free kick which followed, and he broke the deadlock by finding the top corner with an unstoppable effort.
The visitors had chances to extend their lead in the closing stages, with both Llorente and Stephan Lichtsteiner being denied by Neto, but Pirlo's strike proved to be enough to earn them a spot in the quarter-finals.