It was not an easy fight for the 39-year-old Serbian, a firm favourite in China who has never lost in Beijing in 31 matches.
Pumped-up home hope Bu, 24, threatened to spoil the party in the marathon two-hour 52-minute match, frustrating Djokovic by pushing him back and forth across the baseline.
The former world number one needed a medical timeout for his torso after giving back a break in the second set, but held on in a tense tie-break to force a deciding third.
Back with better tennis, 11th-ranked Djokovic won four games in a row and held serve before sinking a backhand winner.
"Amazing atmosphere tonight," Djokovic told an electrified crowd, adding he "tried to give my all".
He will play either Germany's Alexander Zverev, the top seed in Beijing, or Chinese wildcard Shang Juncheng in the quarter-final.