Rafael Leao put Milan ahead in the ninth minute before Sampdoria found an equaliser but three goals from Giroud and a Brahim Diaz strike sealed a convincing win for the recently stumbling Milan.
Milan, who were knocked out in the Champions League earlier this week by Inter Milan in the semifinals after falling to a shock 2-0 Serie A loss by lowly Spezia last weekend, displayed confidence they lately lacked.
“It was good to let go of the disappointment suffered with the elimination from the Champions League,” Pioli told Sky Sport. “We played a good match, scoring many goals. It can only do us good.”
Leao gave Milan an early lead at the San Siro when he beat Sampdoria keeper Nicola Ravaglia with a precise low shot into the bottom right corner.
But Sampdoria managed to level shortly after through forward Fabio Quagliarella, who ended his longest run without a goal in Serie A after he had failed to find the net in his previous 20 games.
Milan, however, responded immediately when Giroud ended a six-game goal drought in the league by heading in to restore the lead. The Frenchman made it 3-1 from the penalty spot in the 29th minute after Sampdoria defender Koray Gunter took down Leao inside the box.
Milan kept the pressure on after the break as they sought to increase the lead and Giroud was close to completing a hat trick but Ravaglia showed great reflexes when he saved his close-range header.
Diaz added a goal to his two assists on the night helped by a stunning cross by Tonali in the 63rd minute.
Giroud completed his hat trick soon after.
Last-placed Sampdoria are on course to finish bottom of Serie A for the first time in their history.
AC Milan vs. Sampdoria – Football Match Report – May 20, 2023