Coppa Italia: Inter 2 Sampdoria 0
The visitors were left facing an uphill battle when Nenad Krsticic was dismissed early on for a professional foul, and their task was made even harder when Pawal Wszolek was also shown red late on for a second bookable offence.
Argentina goalkeeper Sergio Romero kept them in the game until the interval with a string of superb saves, including a penalty stop from Mauro Icardi.
However, Inter were always in control and after Shaqiri had clinically given them the lead after 71 minutes following a neat one-two with Lukas Podolski, Icardi added a late second - intercepting a back-pass from Lorenzo de Silvestri to round Romero and score into an empty net.
Shaqiri was handed his first start for the hosts, while Romero was given the nod between the posts for Sampdoria as both coaches made a host of changes.
Romero had to be alert early on as Podolski looked to pounce on a sloppy back-pass, while the goalkeeper also turned away a dangerous free-kick from Shaqiri.
Sampdoria were reduced to 10 men after just 12 minutes, as Shaqiri broke down the left and tried to play in Icardi, who was clipped from behind by Krsticic with a clear run on goal.
Romero had to make a double save from Mateo Kovacic and Icardi as Inter looked to capitalise on their advantage.
The hosts were then given a great chance to go ahead when Wszolek was penalised for bringing down Dodo in the box after 36 minutes and was shown his first yellow card, but Romero again denied Icardi - this time from the spot - as he blocked a tame effort down low to his right.
More Romero heroics kept out a Podolski header as Sampdoria somehow managed to make it to half-time on level terms.
Inter soon picked up where they left off after the break, with a Kovacic shot deflected wide, while Shaqiri continued to cause problems with his pace and deft touches, although the Switzerland star was also booked for diving in the area.
The hosts' long-range shooting left a lot to be desired as Sampdoria continued to frustrate, but neat build-up play between Shaqiri and Podolski eventually unlocked their stubborn defence with 19 minutes left.
After playing the ball into the former Arsenal forward, Shaqiri latched on to a return pass and fired a shot ruthlessly past the helpless Romero from close range.
Shaqiri went off to a hero's reception soon after as Inter looked content to grind out a hard-fought success, although by that stage their cause had been helped by the dismissal of Wszolek, who was shown a second yellow card for clattering Zdravko Kuzmanovic after 77 minutes.
Inter were gifted a second goal three minutes from time when Icardi pounced on a defensive lapse, nicking the ball on its way back to Romero before slotting home.
Meanwhile, Fiorentina earlier progressed with a 3-1 defeat of Atalanta at Stadio Artemio Franchi, with reported Chelsea target Juan Cuadrado among the scorers.
Germany striker Mario Gomez ended his long wait for a second goal of the season when he put the hosts ahead with a deflected shot after just six minutes, while Cuadrado struck from a dubious penalty.
Gomez scored again to extend the advantage before the half-hour mark and, although Rolando Bianchi replied prior to the interval, there was no way back for the visitors.
Fiorentina had Marcos Alonso sent off 10 minutes from time for a second bookable offence, but they had already done enough for a victory that sets up a quarter-final clash with Roma.