The sixth seed endured a second-set fightback from Halep but eventually prevailed 6-2 1-6 6-0.
Li dominated the opening set, breaking Halep on three occasions to move closer to the next round.
However, the Romanian stunned her opponent in the second set, surging into a 5-0 lead before eventually taking the match into a decider.
The world number 32 couldn't maintain her momentum as she was broken immediately by the experienced Chinese player.
The 31-year-old struck again to open up a commanding lead and sealed a bagel set when Halep went long with a forehand.