Sampdoria have announced that the Italian coach has signed a deal with the club until the 30th June 2021, so Ranieri commands the Genoese team for the remainder of this season and the next.
Ranieri will debut against hometown club Roma on his 68th birthday on Sunday October 20.
Di Francesco terminated his contract with Samp by mutual consent after six defeats in the opening seven Serie A rounds, but first choices Stefano Pioli and Gennaro Gattuso turned down the job.
Ranieri has accepted a two-year contract, although there is reportedly an option to terminate early if the club are relegated to Serie B.
Ranieri has 393 Serie A games under his belt, resulting in 169 victories, 126 draws and 98 defeats.
In an official statement from the club: “The President wishes the Coach, his staff and the team good luck with work based on commitment and passion.”