Jokanovic makes way with the Cottagers sitting bottom of the Premier League table with five points from 12 matches.
Italian Ranieri, 67, has been given a “multi-year” contract by the Londoners.
“Making a change without having the right answer or succession plan was not an option,” said Fulham chairman Shahid Khan.
“So having someone of Claudio’s calibre ready to accept our challenge was comforting but, most of all, essential.
“Claudio is risk-free and ready-made for the Premier League, and particularly so for what we need at this moment at Fulham.
“His recent body of work with Leicester City is literally legendary, and then you look at Claudio’s experience with Chelsea and big clubs throughout Europe, and it’s pretty evident we are welcoming an extraordinary football man to Fulham Football Club.”
Khan said he and his son Tony Khan, the club’s vice chairman and director of football operations, spoke with a number of potential candidates over the past week.
“It is an honour to accept Mr Khan’s invitation and opportunity to lead Fulham, a fantastic club with tradition and history,” said Ranieri, who spent last season in charge of French club Nantes.
“The objective at Fulham should never be to merely survive in the Premier League. We must at all times be a difficult opponent and should expect to succeed.
“This Fulham squad has exceptional talent that is contrary to its position in the table.”
Ranieri’s first game in charge will see Fulham host Southampton at Craven Cottage on Saturday, 24 November.
“I know this team is very capable of better performances, which we will work on straight away as we prepare for Southampton at the Cottage,” he added.
Ranieri’s rollercoaster – title shock to the sack
Despite vast experience with clubs such as Valencia, Juventus, Inter Milan, Roma and Monaco, Ranieri joined Leicester City in 2015 on the back of a failed spell as Greece boss, including losing to European minnows the Faroe Islands during Euro 2016 qualifying.
The Italian had earned the nickname ‘The Tinkerman’ during his previous spell in England in charge of Chelsea, where he guided the Blues to second in the Premier League as well as reaching the Champions League semi-finals.
More than a decade later, his Leicester side started the 2015-16 season as 5,000-1 outsiders to win the Premier League and were among the favourites for relegation.
But the Foxes delivered one the greatest sporting shocks of all time as they clinched the club’s first top-flight English title, described by many as a “miracle”.
The fairytale could not continue, however, with Ranieri sacked the following campaign – just ninth months after delivering the title.
Jokanovic sacking ‘correct decision’
Jokanovic, who joined the club in December 2015, led Fulham to promotion via the play-offs last season.
But they have so far registered just one win on their return to the Premier League after four seasons in the Championship.
“I wasn’t anticipating having to make this announcement related to Slavisa and wish the circumstances were such that I didn’t have to, but our path this season has led me to make what I know is the correct decision, at the right time, for our players, the club and our supporters,” added Khan.
“Slavisa will always have my appreciation and respect for everything he did to return Fulham to top-flight football.
“I am hoping everyone in the Fulham family shares my heartfelt sentiments for Slavisa and joins me in wishing him success and good fortune, wherever his next stop may be.”
Analysis – Can the Tinkerman keep Fulham up?
Phil McNulty, BBC Sport chief football writer
Fulham’s owner Shahid Khan delivered combative public support for manager Slavisa Jokanovic in his programme notes for the home game against Bournemouth less than three weeks ago, telling fans “don’t believe anything” in reports he faced the sack.
Times change. Quickly.
Fulham were beaten 3-0 by The Cherries, then lost at fellow strugglers Huddersfield Town, and Sunday’s defeat at Liverpool was the last straw. The man who guided The Cottagers to promotion was gone.
Khan reacted as Fulham lay bottom of the Premier League, after a summer investment of £100m only resulted in an imbalanced side where few new faces had made an impact, a loss of the attacking impetus that was their trademark and the worst defensive record in the division.
The fear of relegation always overrules sentiment.
So it is welcome back to the Premier League for ever-popular Claudio Ranieri, whose title-winning deeds at Leicester City will be remembered forever.
This time he must work fast to turn a serious situation around with his brand of personal charm but more importantly his tactical acumen, starting with shoring up that porous defence.
It will be no easy task for ‘The Tinkerman’.