The 63-year-old Italian replaces Nigel Pearson, who was sacked on 30 June despite keeping the Foxes in the Premier League last season.
Ranieri has not worked in England since leaving Stamford Bridge in 2004, and was sacked as Greece manager last year.
"Since I left Chelsea I have dreamt of another chance to work in the best league in the world again," he said.
"I wish to thank the owner, his son and all the executives of the club for the opportunity they are giving me. Now I've only one way for returning their trust: squeeze all my energies to getting the best results for the team."
Ranieri left as manager of Atletico Madrid to join Chelsea in September 2000 and during his four-year spell, the Blues finished runners-up in the Premier League, reached the Champions League semi-final and were FA Cup finalists.
Ranieri was replaced at Chelsea by Jose Mourinho and the Italian went on to manage Valencia, Parma, Juventus, Roma, Inter Milan and Monaco.
He took over as Greece coach after the 2014 World Cup in Brazil but was sacked four months later after a home defeat by the Faroe Islands.
BBC Sport's Gary Lineker, a former Leicester striker, said of the appointment: "Claudio Ranieri is clearly experienced, but this is an uninspired choice by Leicester. It's amazing how the same old names keep getting a go on the managerial merry-go-round."
Pearson guided the Foxes to 14th in the league last season, winning seven and drawing one of their last 10 games to stave off relegation.
But the 51-year-old was dismissed last month, with the club stating their working relationship was "no longer viable".
It came after his son, Leicester trainee James, was involved in a racist sex tape in the Leicester owners' homeland of Thailand.
Pearson senior was involved in several high-profile incidents last term, including calling a journalist an "ostrich" and clashing with Crystal Palace's James McArthur.
Media playback is not supported on this device
Former Chelsea boss Claudio Ranieri has been appointed Leicester City's manager on a three-year contract.