Andreeva becomes youngest Grand Slam semi-finalist since 1997
The 17-year-old fought back from a set down against her ailing opponent to win 6-7 (5/7), 6-4, 6-4 after two hours and 28 minutes and set up a last-four meeting with Italy's Jasmine Paolini.
Andreeva is the youngest woman to make the semis at a major event since Martina Hingis at the US Open 27 years ago and also the youngest at Roland Garros since Hingis in 1997.
She will fancy her chances of going all the way to the final when she faces Paolini - who had never got past the second round at a Grand Slam before this year - on Thursday.
Sabalenka called for multiple medical time-outs as she complained of not feeling well and Andreeva, playing in her maiden Slam quarter-final, eventually took advantage.
Two-time Australian Open champion Sabalenka had powered through the first four rounds but was clearly having difficulties, breathing heavily between points.
Andreeva, currently ranked 38th, had already secured a breakthrough into the world's top 30 with her run to the last eight, but is now poised to rise further.