The Russian dropped just his third set of the tournament as Dimitrov got off to a flying start until Karatsev came back as the Bulgarian picked up an abdominal injury before the start of the third set.
Karatsev is into the semifinals on his Grand Slam debut, the fifth qualifier in the Open era to reach the last four of a major and will face top seed Novak Djokovic in the semifinals for a place in Sunday's final.
Karatsev seals historic semifinal berth with upset of Dimitrov
The Russian looked as though nerves were finally getting to him in an error-prone first set. Despite getting out to an early break lead at 2-1, Karatsev committed 19 unforced errors as Dimitrov claimed the next five games to take a one-set lead.
In the second game of the second set, the 114th-ranked qualifier saved five break points in a 12-minute game and he broke three games later as Dimitrov misfired with a forehand for a 3-2 lead. After getting broken back, the Russian rifled a backhand winner to break again.
Serving for the set at 5-4, Karatsev held to love as Dimitrov was wayward with a backhand and the match was level at one set apiece. It was at this point where the 18th seed hurt himself and it showed as the Bulgarian won just eight points over the final six games of the third set.
Stinging back-to-back forehand winners gave the Russian a two sets to one lead and it was much the same in the fourth set: Karatsev breaking to go in front 2-1, an ace to consolidate his lead and breaking with four winners, the last on his backhand, the 34th of the match for Karatsev on match point, sealed his place in history.