Djokovic made a fast start by breaking in Medvedev's second service game, though there was concern when the 21-time grand slam winner required a lengthy medical timeout at 5-2 up in the opening set.
With Djokovic's long-awaited return to the Australian Open just over a week away, the sight of the Serbian clutching his left hamstring was an unwelcome one, but he eventually returned to the court to take the opener 6-3.
Having shown his staying power in a low-key start to the second set, Djokovic claimed the vital break following some excellent work at the net in the seventh game, though Medvedev was ultimately the master of his own downfall after producing a double fault at break point.
Djokovic then faced break point in the next game as Medvedev desperately tried to claw his way back into the contest, but a huge second serve eventually saw him hold off the Russian, who was unable to trouble him thereafter.
Speaking court-side after teeing up his 131st ATP Tour final, Djokovic played down concerns over his hamstring issue, saying: "Thankfully, it was nothing too serious.
"If it was, I wouldn't have been able to continue. I just tried with a medical timeout and some anti-inflammatories and I just settled in.
"The more the match went on, the more my hamstring was warmer, I guess, and bothering me less. So hopefully tomorrow it will be okay."
Asked whether he considered retiring in order to save himself for the first grand slam of the year, Djokovic added: "I can't say it didn't cross my mind today on the court.
"But you just can't calculate on the court. At this stage of my career, every match counts, every match is a present in a way, so I just try to give my best and win wherever I am."
Yoshihito Nishioka also struggled with an injury in the day's other semi-final, but the world number 36 was less fortunate than Djokovic as he retired midway through his clash with Korda.
Korda took a close opening set via a tie-break after Nishioka ranted at a second umpire in as many days, raging when a point was replayed following an error from a line judge.
Nishioka saw his serve broken in the first game of the second set before calling a medical timeout after seeming to struggle with a leg injury, and his subsequent retirement ensured Korda advanced to his fifth ATP Tour final.
World number one Djokovic needed a little under an hour to beat Coria 6-1 6-0 on Thursday and set up a semi-final with Andrej Martin on home soil.
The victory moves the 34-year-old above Argentine great Guillermo Vilas for the fifth-most victories in the Open Era with 952.
He is 70 wins adrift of fourth-placed Rafael Nadal (1,022). Ivan Lendl (1,068) is third, behind Roger Federer (1,243), with Jimmy Connors holding the record of 1,274 wins.
Djokovic won 53 of the 75 points played against Coria and dropped just one game to remain on course for a third crown in Serbia ahead of the French Open.
"It was a great display," Djokovic said in his on-court interview. "It's probably one of the best matches, if not the best match, I played this year. I felt fantastic from the first point.
"It was the first time that I played against Coria and I tried to impose an aggressive style from the very beginning and not allow him to have too much time to play around. I played a phenomenal second set, really flawless.
"It's not always possible to play like this. But I think this definitely helps me feel better on the court. I think everything worked perfectly for me today."
Martin awaits Djokovic in the last four after the world number 119 recovered from a set down to beat Dusan Lajovic 3-6 6-3 6-4.
Alex Molcan remains in the hunt for a shock triumph in Belgrade, meanwhile, after beating Fernando Verdasco 6-2 6-0 to set up a showdown with Federico Delbonis.
Eighth seed Delbonis advanced to his second semi-final of the season following Roberto Carballes Baena's withdrawal through illness.
At the Emilia-Romagna Open in Parma, Sebastian Korda eliminated Yoshihito Nishioka to set up an all-American semi-final with Tommy Paul, who took down Jan-Lennard Struff with a 6-2 6-4 victory.
Richard Gasquet was another seeded player to fall as he lost 6-1 6-1 to Jaume Munar, with the Spaniard now set to take on Italian wild card Marco Cecchinato – a straight-sets winner against lucky loser Norbert Gombos – for a place in the final.
Karatsev got past Djokovic in the longest match of the 2021 ATP Tour in Belgrade, triumphing 7-5 4-6 6-4 on Saturday.
The match went for three hours and 25 minutes, with the Russian securing a spot in Sunday's final against 10th ranked Matteo Berrettini.
The Serbian had beaten Karatsev in the Australian Open semi-finals two months ago, with the 27-year-old Russian, who is now ranked 28th, returning the favour.
"From my side, I played on quite a low level, in my opinion," Djokovic said.
“[I had] some flashes of good quality tennis. I was fighting. That is a positive.
"I was really trying all the way [and] the crowd was great. They carried me and tried to lift me up, all the way to the end.
"Because of them, I think I won the second set. Unfortunately in the third, he was just the better player in the decisive moments. I had my chances, but that is sport."
Djokovic was gracious in defeat, offering a thumbs up immediately after Karatsev secured victory along with complimentary words to his opponent who saved 23 of 28 break points.
"Karatsev showed a lot of courage and that is why I gave him the thumbs up," Djokovic said.
"I felt like he deserved to win… Once the final point is done, there is never bad blood. We are rivals on the court, but I don’t hate anybody. I can’t be upset with him if he beat me.
"I have to be upset with myself and question why I lost the match. Whoever beats me deserves the credit and I gave him that.
"I lost to a better player who was just more courageous. He went for his shots at the right time and it worked for him."
World number one Djokovic was in danger of losing three straight ATP Tour matches for the first time in over four years when he surrendered the opening set to his fellow Serbian in front of an adoring crowd.
The 20-time grand slam winner was two points away from defeat in the second-set tie-break but managed to force a decider by converting set point at the sixth attempt.
And Djokovic needed another tie-break to get the job done, with Djere paying the price for a series of errors as he missed out on a chance to claim a famous victory.
Next up for Djokovic, who bounced back from successive defeats to Jiri Vesely and Alejandro Davidovich Fokina in Dubai and Monte Carlo respectively, is Miomir Kecmanovic.
Seventh seed Kecmanovic faced little resistance from John Millman as he claimed a 6-4 7-6 (7-5) success, while Karen Khachanov was granted a walkover against Roman Safiullin.
At the Barcelona Open, Carlos Alcaraz advanced to the third round courtesy of a 6-1 2-6 6-2 victory over Kwon Soon-woo.
He will face Jaume Munar for a place in the quarter-finals following the wildcard's 6-1 6-4 triumph against ninth seed Nikoloz Basilashvili.
Felix Auger-Aliassime was taken the distance by Carlos Taberner but eventually closed out a 6-1 3-6 6-4 success. His reward is a meeting with Frances Tiafoe, who beat Hugo Dellien 7-6 (7-3) 6-1.
Lloyd Harris defeated Albert Ramos Vinolas 6-3 6-4, while Alex De Minaur, Emil Ruusuvuori, Pablo Carreno-Busta and Marton Fucsovics also advanced.
Inclement weather brought a halt to top seed Stefanos Tsitsipas' meeting with Ilya Ivashka after just one game, while Grigor Dimitrov was up a break in the third set of a clash with Federico Coria.
The world number one was beaten 6-2 6-7 (4-7) 6-0 by the Russian second seed, who drove a forehand past Djokovic on his third championship point.
Djokovic was seeking a third triumph at this tournament, and an 87th tour-level title of his career, but 24-year-old Rublev came out on top, scooping his third trophy of the year after previous successes in Dubai and Marseille.
Having been barred from playing in Australia and the United States in the early stages of the season, due to being unvaccinated against COVID-19, Djokovic was playing just his third tournament of the year.
He lost to Jiri Vesely in the Dubai quarter-finals and to Alejandro Davidovich Fokina in his clay campaign opener in Monte Carlo, and on home clay he won three matches from a set in arrears but could not make it four in a row.
Djokovic had worked hard to get back on level terms in Sunday's final after making a slow start, and he had two break points immediately in the third set.
Rublev saved both, the second with an audacious drop shot, on his way to taking the game, and he streaked through the rest of the decider.
This was just the second meeting on the ATP Tour between Djokovic and world number eight Rublev, with Djokovic having previously enjoyed a crushing hard court win at the ATP Finals in Turin last November.
Rublev, addressing Djokovic, said: "It's a big honour to play against you, to share a court for the second time.
"I hope to see you for many years, and we will have more battles which I would like.
"I feel so great here in Belgrade. It's a really nice city. It reminds me of a small Moscow. I really enjoy my time here and to win a title here I feel double special."
The world number one looked well placed to cruise to victory after taking just 38 minutes to win the first set 6-1, but qualifier Martin hit back in the second to force a decider.
Djokovic swiftly regained composure, though, with a bagel settling the contest 6-1 4-6 6-0 in his favour, and he will now have the backing of his home crowd as he looks to clinch his third Belgrade Open title and warm up for the French Open in style.
"I'm super excited to play in front of a Serbian crowd. This is my home town," said Djokovic, who previously won at the event in 2009 and 2011.
"I'm always excited, but also nervous, coming out on the court and playing in front of my home crowd. It's a very unique feeling. You feel a lot of pressure and expectations. But I'm just happy to fight for a trophy.
"I thought I started and finished the match really well, so I'll try to take those positive feelings into tomorrow's final. I also had some letdowns in concentration towards the end of the second set, and I'll try to correct those mistakes for tomorrow."
Standing in the way of a second title of the season for 34-year-old Djokovic is another qualifier, Slovakian Alex Molcan, who came from behind to beat Federico Delbonis 4-6 6-4 6-4.
At the Emilia-Romagna Open, Sebastian Korda, who has yet to drop a set this week, triumphed in an all-American semi-final contest, beating Tommy Paul 6-3 6-3 to reach his second Tour-level final.
Korda's win sets up a final against Italian Marco Cecchinato, who is aiming for his fourth career singles title after overcoming Jaume Munar 7-6 (7-2) 1-6 6-1.
Teenager Van Assche took a big step towards a stunning victory after going a set ahead, but the world number one rallied to seal his progression against the stubborn Frenchman.
Djokovic, who admitted his right elbow "was not in an ideal condition" earlier this week after a shock exit at the Monte Carlo Masters, was not at his brilliant self as Van Assche took the first set by finding two crucial breaks in the tie-break.
The Serbian improved, though, and he dominated the second set by holding all five of his service games and breaking twice to take the match to a decider.
With the first two games of the final set going against serve, Djokovic took over to win four of the next six and secure a comeback triumph.
Just over a month ahead of the French Open, Djokovic will be glad to have battled to victory in Banja Luka as he prepares for an attempt to win a record 23rd grand slam title at Roland Garros having already claimed the Australian Open crown earlier this year.
Playing his first singles event since winning Wimbledon in July, Djokovic landed a 6-3 6-4 victory, improving his career head-to-head winning record to 19-2 against former US Open champion Cilic.
He broke serve to lead 3-1 in the opening set, and then struck immediately in the second set to tighten his grip on the contest, completing the task with a service winner on his first championship point.
This indoor hard-court success goes down as a third title of the year for Djokovic, who won the Internazionali d'Italia on clay before triumphing on the Wimbledon grass. He is the first man to win a title on all three surfaces in 2022 at ATP Tour level.
Prevented from playing the North American hard-court stretch of the season, due to his refusal to accept a COVID-19 vaccination, Djokovic sat out the US Open.
He made his first post-Wimbledon appearance at the invitational Laver Cup team event in London last week, which doubled up as Roger Federer's retirement party.
At the age of 35, Djokovic hopes to be a presence on tour for a good while to come, and Sunday's straight-sets picking apart of Cilic was a fresh demonstration of his enduring prowess.
The Serbian was made to work hard by his Canadian opponent, particularly in the first set, but eventually won 7-6 (7-5) 6-3.
Djokovic was particularly impressive on his second serve, winning 70 per cent of them, only four per cent less than his first serve success rate, and he hit just eight unforced errors compared to Pospisil's 21.
"It was a great, positive win," Djokovic said afterwards. "Vasek is one of my best friends on the Tour. We have known each other for many years. It is never easy playing someone you respect so much and like so much, but we are both professionals and wanted to win the match and you can see that.
"I think the level of tennis was really high. Especially towards the end of the first set and the second set. Credit to him for fighting. It's great to see him back."
The number one seed will play Roman Safiullin in the semi-finals after the Russian beat Arthur Rinderknech 6-4 6-1.
Constant Lestienne came through a tight contest with Maxime Cressy, winning 6-7 (4-7) 6-3 7-6 (7-3), and will face number two seed Marin Cilic in the other semi after the Croatian was handed a bye following Liam Broady's withdrawal prior to their match.
At the Sofia Open, Jannik Sinner remains on course for a third successive title at the tournament, setting up a final-four encounter with Holger Rune after easing past Aleksandar Vukic 6-2 6-3, with Rune eventually dispatching Ilya Ivashka 6-2 5-7 6-4.
The other semi-final in Bulgaria will see Lorenzo Musetti take on Marc-Andrea Huesler after both won their respective quarter-finals against Jan-Lennard Struff and Kamil Majchrzak.
Djokovic – who saw a three-year visa ban lifted in November – played with Vasek Pospisil in the doubles on Monday, but this was his first singles outing in the country since his vaccine-related absence from last year's Australian Open.
"For the first match [of the season] I can't complain," Djokovic said. "I played very well. I thought the first six games were very competitive and I have never faced him before.
"But once I made that break at 3-2 in the first set I thought I stepped it up and played really good tennis for the rest of the match."
Elsewhere in Adelaide, third seed Daniil Medvedev advanced after Lorenzo Sonego retired hurt with the Russian leading by a set, while sixth seed Jannik Sinner eased past Kyle Edmund 6-3 6-2.
Seventh seed Denis Shapovalov is also through after coming from a set down to beat Rinky Hijikata, but fourth seed Andrey Rublev is out after losing to Roberto Bautista Agut in three sets.
The Spaniard will face Sebastian Korda next after he beat Andy Murray 7-6 (7-3) 6-3, while eighth seed Karen Khachanov advanced after beating Pedro Cachin 6-2 6-4.
At the Maharashtra Open in Pune, Aslan Karatsev had no problems seeing off Pablo Andujar 6-1 6-3, with the eighth seed set to face Tim van Rijthoven in the last 16 after the Dutchman beat Radu Albot 6-4 6-4.
There were also wins for Maximilian Marterer against Elias Ymer and Pedro Martinez against Ramkumar Ramanathan.
The 16-time grand slam champion was scheduled to play at the inaugural edition of the event ahead of the Australian Open, but his withdrawal was announced on Saturday.
Djokovic, 32, has been in action for Serbia at the ATP Cup, winning all five of his singles matches to help his nation into the final.
Adelaide International tournament director Alistair MacDonald said: "We understand his decision and wish him the very best of luck for the remainder of the ATP Cup and the upcoming Australian Open."
A record seven-time Australian Open champion, Djokovic will again enter the tournament in Melbourne as one of the favourites.
The Australian Open begins on January 20.
In the first meeting between Draper and Thiem, it was the 20-year-old Brit who sealed his place in the last eight with a routine 6-1 6-4 victory.
Draper charged ahead in the first set, creating five chances to break and taking two of them, while his sole successfully converted break point in the second set paved the way for the Winston-Salem debutant to serve out the match.
World number 55 Draper has now reached three Tour-level quarter-finals this season, while 2020 US Open champion Thiem had been on a run of making it to the last eight in his last three tournaments, in Bastad, Gstaad (where he made the semis) and Kitzbuhel.
Draper did not offer up a single break opportunity, and said: "I was really good behind serve, really solid. In the second set it was tough because he was coming up with some amazing shots. It was a real honour to be on court with Dominic. He's an amazing player.
"I started confidently, I started well. I was hitting through the ball, felt good in the conditions. It was a difficult start because I felt like everyone was supporting Dominic and I knew that I needed to come out confidently and sharp, and that's what I did."
Draper will meet Marc-Andrea Huesler in the quarter-finals, after the world number 102 overcame Ilya Ivashka.
Botic van de Zandschulp is the favourite after Grigor Dimitrov's retirement due to illness with the Dutchman progressing to the last eight by defeating Spain's Jaume Munar in straight sets. He will face Benjamin Bonzi after the Frenchman's 7-5 6-2 defeat of Thiago Monteiro.
Maxime Cressy will face Adrian Mannarino after coming from a set down to beat Lorenzo Sonego 6-7 (4-7) 6-2 7-6 (7-3), while Richard Gasquet and Laslo Djere make up the other quarter-final tie after respective victories over Steve Johnson and Jason Kubler.
Edmund – the eighth seed – defeated Japanese opponent Yasutaka Uchiyama 7-5 6-4 at the ATP Tour 250 tournament on Tuesday.
The Brit won 86 per cent of his first serves as he earned a clash with Dominik Koepfer after one hour, 44 minutes.
German Koepfer defeated last year's runner-up Brayden Schnur 7-5 6-4 in the opening round.
Kevin Anderson – the 2018 champion in New York – was stunned 7-6 (8-6) 6-4 by qualifier Jason Jung, who will face Cameron Norrie after the seventh seed beat Brian Shi 7-5 6-3.
Elsewhere, Jordan Thompson accounted for veteran Ivo Karlovic 6-3 7-6 (7-2), Yoshihito Nishioka outlasted Henri Laaksonen 6-3 0-6 6-2, Paolo Lorenzi prevailed 4-6 6-4 6-0 over Danilo Petrovic and Go Soeda went down 6-2 6-7 (2-7) 6-3 to Kwon Soon-woo.
At the Argentina Open, Cecchinato's title defence was ended by Roberto Carballes Baena in the first round.
Cecchinato was upstaged 6-4 7-6 (7-3) by Carballes Baena, who saved five of six break points on the clay in Buenos Aires.
Next up is Casper Ruud after the eighth seed blitzed Pablo Andujar 6-2 6-3.
Fellow seed Laslo Djere and Albert Ramos-Vinolas also progressed to the last 16, along with Facundo Bagnis, Juan Ignacio Londero, Pedro Sousa, Pedro Martinez and Jozef Kovalik.
Edmund reached his third ATP Tour decider and first since 2018 with a 6-1 6-4 thrashing of Miomir Kecmanovic in their semi-final.
The British eighth seed needed just 71 minutes to brush past Kecmanovic, converting three of seven break points.
Awaiting Edmund in the final of the ATP 250 tournament is Seppi after the Italian veteran beat qualifier Jason Jung 6-3 6-2.
Seppi, 35, is a three-time title winner on the ATP Tour, although the last of those came in 2012.
At the Argentina Open, Norwegian eighth seed Casper Ruud overcame Juan Ignacio Londero 4-6 7-5 6-1 in their semi-final.
Ruud's win means he will become Norway's highest ranked male player ever, taking the record from his dad Christian, who reached 39th in the world in 1995.
Into his second ATP final, Ruud will face Pedro Sousa after the lucky loser's run continued.
Sousa moved through after Diego Schwartzman withdrew from their semi-final due to a leg injury.
The Argentinian had struggled late in his win over Pablo Cuevas on Friday, when he needed three hours, 41 minutes to advance.
After just over an hour and a half, fifth seed Evans sealed a 6-4 6-4 victory over Egor Gerasimov in their first meeting on the ATP Tour.
Evans won 85 per cent of points behind his first serve and did not face a single break point as he advanced to the second round. Malek Jaziri or Alejandro Davidovich Fokina will be his next opponent.
Following a tight opening set, Khachanov overcame Mackenzie McDonald 7-6 (7-3) 6-3 to continue his impressive form early in the 2022 season.
Alex Molcan came from a set down and navigated a second-set tie-break to defeat Chris O'Connell and earn a meeting with Shapovalov in the second round.
At the Open 13 in Marseille, home hope Richard Gasquet overcame Mikael Ymer 6-4 7-5 to book a meeting with Andrey Rublev in the second round. There were also wins for Stefano Travaglia and Ilya Ivashka.
Federer has not played competitively since his semi-final exit at the 2020 Australian Open – the 20-time grand slam champion having undergone knee surgery last year.
But the 39-year-old Swiss great will make his long-awaited comeback against Evans in Doha on Wednesday.
Evans – who has been practicing with Federer – outlasted Frenchman Jeremy Chardy 6-4 1-6 6-2 in the round of 32 at the ATP 250 tournament.
"We obviously practised for [the] past two weeks [in Dubai], and I thought he was playing pretty well," Evans said. "We played plenty of sets. It was competitive. But it's all very different when you get on the match court.
"It will be a lot different tomorrow. It's going to be at night, as well, so a little slower. So we'll see how the match goes."
Second seed Federer – a record three-time Qatar Open champion – watched from the stands on Tuesday and Evans added: "He obviously has seen a lot of my game the past few weeks, so I guess I would say it was more out of boredom.
"He's probably [was] waiting for his practice [more] than scouting out what's happening on the court. Let's put it down to that."
Elsewhere, sixth seed David Goffin topped Filip Krajinovic 6-4 6-4 en route to the last 16 but three-time slam champion Stan Wawrinka was stunned 7-6 (7-3) 6-7 (6-8) 7-5 by qualifier Lloyd Harris.
Marton Fucsovics, Vasek Pospisil and Malek Jaziri also advanced through to the next round.
At the Open 13 Province, three-time champion and French veteran Jo-Wilfried Tsonga celebrated his first ATP Tour victory since 2019.
Tsonga – hampered by injuries, including left knee surgery –rallied from the brink to see off Feliciano Lopez 3-6 6-4 7-5 in Marseille on Tuesday.
"This is probably one of the best victories of my career, because it was tough for me to play tennis. I had so much pain for so many months," Tsonga said in an on-court interview. "Today, I won one match. That was one of my goals for these few weeks… I’m happy like a kid."
Next up is fourth-seeded countryman Ugo Humbert, who upstaged sixth seed Kei Nishikori 6-1 6-4.
Meanwhile, Federico Coria and Federico Delbonis were among the victors at the Chile Open.
Federer has not played competitively since his semi-final exit at the 2020 Australian Open – the 20-time grand slam champion having undergone knee surgery last year.
The 39-year-old Swiss superstar opted not to travel to Melbourne for this year's Australian Open, but he is set to make his comeback in Doha next week.
Before departing for Qatar, Federer said on Friday: "It's been a year since my last travel to any event and I'm very excited.
"This is the moment where I could maybe thank all the people involved who made this possible.
"It's been a long and hard road. I know I'm not at the finish line yet, but it's good."
Federer holds the record for most Qatar Open titles with three, with his most recent success at the ATP 250 event coming in 2011.
The 103-time tour-level champion added: "I feel like I'm in a good place, I've been practising very well.
"Hope you guys also are going to tune in to watch it and I hope I see you again very soon. Take care everybody."
Federer and Spanish great Rafael Nadal have both won a record 20 major titles.
Veteran Federer is on the comeback trail and planning to play tournaments in Doha and Dubai in March, building up to Wimbledon and the Tokyo Olympics, key goals for what might prove to be his final season on tour.
Former Wimbledon champion Michael Stich believes winning a ninth SW19 crown would be the perfect moment for Federer to bow out.
Stich told Stats Perform News recently: "It is clear that at some point he will stop. Many would have thought that already five years ago.
"We have no influence on that. I would wish for him to win Wimbledon and say after the final: 'You know what, I had a sick time, I'll stop.'
"There couldn't be anything better and that would give so much to the sport."
The 20-time grand slam champion made his comeback at the Qatar Open last month after a long absence following knee surgery.
Federer was beaten by Nikoloz Basilashvili at the quarter-final stage in Doha before opting against playing in Dubai and Miami.
The 39-year-old Swiss on Sunday announced he will feature on home soil in a Geneva Open event that gets under way on May 16.
World number seven Federer will also be in the draw for the second grand slam of the year at Roland Garros, where he reached the semi-final two years ago in his first appearance at the Paris major since 2015.
He tweeted: "Hi everyone! Happy to let you know that I will play Geneva and Paris.
"Until then, I will use the time to train. Can't wait to play in Switzerland again."
Rafael Nadal will be a strong favourite to surpass Federer's tally of grand slam titles in Paris, where he has won the French Open a record 13 times.
After 14 months out following knee surgery, Federer was back in action at the Qatar Open on Wednesday, defeating friend and practice partner Dan Evans in three sets in the last 16.
But Nikoloz Basilashvili, Federer's next opponent, proved a step too far in the quarter-finals on Thursday as the 39-year-old Swiss superstar went down 3-6 6-1 7-5.
Federer breezed through the opener and recovered from a tough second set to forge a match point in the decider, but Basilashvili stuck with his "idol" and earned a first career win against the 20-time grand slam champion.
The result would not put a dampener on Federer's week, however.
"I'm already over it," Federer said. "I mean I would have loved to play tomorrow - don't get me wrong, you know - but at the same time I'm also happy to get a rest.
"I'm happy how I played today. I'm happy how I did yesterday. I'm happy I was back on the Tour. I'm pleased I came here to Doha.
"So it's a really, really positive return for me.
"I'm actually happy that I was able to play back-to-back three-set matches against top players. That's an important step forward for me. This is a stepping stone."
But Federer announced later on Thursday he had made the decision to return to training, putting on hold plans for a second tournament of the season.
He had been set to join a number of other big names in Dubai, although Spanish great Rafael Nadal has rejected a wildcard.
Federer wrote on his social media pages: "It's been great to be back on the @atptour, loved every minute playing in Doha once again. A big thank you to the best and loyal team that helped me get here.
"I've decided it's best to go back to training and as a result, I've decided to withdraw from Dubai next week."
Federer is an eight-time Dubai champion, most recently in 2019 when he defeated Stefanos Tsitsipas in the final.
Roger Federer's return to the ATP Tour lasted just two matches at the Qatar Open as he was beaten in the last eight by the brilliant Nikoloz Basilashvili.