Having missed last year's tournament following his deportation from the country over his unvaccinated status, the nine-time champion was given the green light to compete this year after his three-year visa ban was overturned.
After making a successful start to his Australian tennis summer by winning Adelaide International 1 tournament with a three-set victory over Sebastian Korda on Sunday, Djokovic opened his Melbourne Park campaign with a clash against Medvedev.
The encounter was due to last 75 minutes, but Djokovic bowed out after 36 minutes.
"It's the hamstring that I had problems with in Adelaide last week," he told 9News Melbourne.
"I just felt it pulling and I didn't want to risk anything worse. I played a set and apologised to him [Medvedev] and he was understanding. I just want to avoid any bigger scares before the Australian Open."
He first received treatment with the score 3-2 in his favour as the trainer did several knee stretching exercises - which often helps to release the hamstring - and after Medvedev won the next two games he again called for the trainer.
The Russian went on to win the set 6-4 before Djokovic called it quits. Medvedev did complete the practice match as Spaniard Pablo Andujar stepped in and played the remaining 39 minutes.
However, it puts major question marks over Djokovic's fitness with the season-opening Grand Slam just days away. He tweaked his hamstring during his Adelaide semi-final win over Medvedev, but he played down concerns after the match and again after the final win over Korda.
"I woke up all right. Went deep into night last night with work done with the physio. Talk with the doctors, as well, of the tournament, et cetera," he said. "There was a lot of care going into today's match about the hamstring. It was all right.
"Few times in the match I felt was tightening up, the muscle, but nothing that would worry me for my performance."
The 21-time Grand Slam winner is due to play another practice match on Friday as he has signed up for the high-profile clash against Nick Kyrgios.
Tickets for the match - dubbed the Arena Showdown between "tennis' most famous frenemies" - were sold out in under an hour.
The Australian Open starts on Monday January 16 and Djokovic is the heavy favourite to win a record-extending 10th crown at Melbourne Park. He is set to be seeded fourth with defending champion Rafael Nadal top seed ahead of Casper Ruud and Stefanos Tsitsipas.