Italian forward Fabio Quagliarella marked his 500th Serie A appearance with the opening goal against relegated Parma who will finish the season bottom of the table.
Ranieri, 69, announced on Friday he would not coach the Genoa club next season with his contract due to expire in June, after just under two seasons.
Quagliarella broke through after 20 minutes finishing off an Antonio Candreva cross, with Omar Colley sending in a rebound before the break.
Candreva again set up Manolo Gabbiadini to curl in the third after an hour to seal the three points and move his team up to ninth.
Quagliarella has scored 177 top flight goals and 99 for Sampdoria, including 13 this season.
The Italian international has played over 200 times for Sampdoria, and was the Serie A top scorer in the 2018-2019 season with 26 goals.
Quagliarella made his top flight debut in Torino in 2000.
He has also played for Udinese, Napoli and Juventus, winning three Serie A trophies with the Turin club.
Genoa beat Cagliari 1-0 with Eldor Shomurodov scoring the only goal after quarter of an hour in Sardinia.
Fiorentina were held to a goalless draw at relegated Crotone.
Champions Inter Milan will get to celebrate their first league title since 2010 in front of 1,000 supporters in their final game at the San Siro against Udinese on Sunday.
Dethroned Juventus are in a three-team race with AC Milan and Napoli for the final two Champions League places behind Inter and Atalanta.
Juve travel to 11th-placed Bologna trying to avoid missing out on the Champions League for the first time since 2011-12.
But a win may not be enough with the results of AC Milan at Atalanta and Napoli at home against Hellas Verona, also deciding their European fate.
#Ranieri #exits #Sampdoria #win #Parma