With pregnant Serena Williams missing and a number of notable early exits, a first-time Grand Slam women’s singles champion will be crowned in Paris.
Wozniacki, 26, boasted the best pedigree of the eight players left in the draw, and was tipped by some observers to win her first major title.
The Dane ended the year as world number one in 2010 and 2011 and has reached two US Open finals without success.
The gulf in experience between Wozniacki, who was competing in her eighth Grand Slam quarter-final, and Ostapenko was huge.
The Latvian looked a little nervous as Wozniacki eased into a 5-0 lead in the first set, but pegged her back to 5-4 before Wozniacki broke her serve for a third time to clinch the opener.
Ostapenko took only two of 11 break points in the first set, but was more clinical when the chances continued to come in the second set.
Both players again struggled to hold their serve, exchanging breaks before Ostapenko rattled off three games in a row to lead 5-2.
Ostapenko served out for the set after the first three-hour rain delay, and then grew in confidence in the decider as Wozniacki wobbled.
Ostapenko broke her serve in the fifth game, going on to win the final five games to become the first Latvian women to reach a Grand Slam semi-final in the Open Era.