Djokovic won 6-7(5) 6-2 4-2 in a fluctuating tussle with the third-seeded Czech who was hampered by a thigh injury in the closing stages.
The pair were evenly matched in the opening set with neither earning a break point in the first 11 games but Djokovic saved two set points before losing the tiebreak 7-5.
The Serbian second seed had looked sluggish in the first set but he offered more of a threat in the second, holding a break point for 2-0 and breaking for 3-1 when Berdych netted a backhand.
ATP Dubai
Djokovic to face Musetti on return to tennis action in Dubai
19/02/2022 AT 13:16
Both players saved break points in the next two games but Djokovic broke again for the set before Berdych called for the trainer and had his left thigh massaged.
Games went quickly in the final set as both players held serve comfortably until Djokovic broke to lead 4-3. Berdych lost the next two points before deciding to retire.
"The problem was my left quadriceps," Berdych said. "Was not able just to serve, move to the sides, and just feel the pain. It's no chance to just play with this guy in the condition that I was feeling.
"Just didn't make sense to be walking and just be able to finish, so that's not my style. I felt it just too much for the serve and I couldn't serve.
"So to play Novak, one of the best returners, this time to play without the serve, no chance."
Djokovic was very unhappy with the way he played.
"I don't know how to explain today's match really. In one word, catastrophe," the Australian Open champion said.
"I think the match overall and my game, it was the worst match this year for me, worst performance. But I managed to get a win, so I guess that's what matters.
"I hate it when I play this way, but I was still trying to fight within myself and try to stay focused and at least hold serve."
Djokovic will play top seed and four-times former champion Roger Federer in Saturday's final.
Henman tips Nadal as 'slight favourite' for French Open if foot is fine
‘I didn’t like how I handled the situation’ - French Open withdrawal still on Osaka’s mind