ALSO READFrench Open: Thiem tames Djokovic in straight sets to reach semis Wild-card entry Sharapova makes winning comeback from 15-month doping ban French Open mixed doubles: Rohan Bopanna clinches maiden Grand Slam title Serena clinches record 23rd Grand Slam title with Australian Open triumph Christopher Clarey: End of the Djok?
Ostapenko, 20, is the first unseeded player to lift the Roland Garros title in the Open era and the first Latvian major champion in history.
For Halep, bidding to join compatriots Ilie Nastase and Virginia Ruzici as major winners, it was a second final defeat in four years at Roland Garros.
The 25-year-old would have replaced Angelique Kerber as world number one with victory, but Halep was overpowered as Ostapenko blasted 54 winners to the Romanian's 10.
But the Romanian delivered a swift counter-punch, hitting back straight away on the Latvian's serve before holding with ease for 2-1.
Ostapenko's wildness betrayed her as she served to stay in the set at 4-5, netting a forehand to offer Halep set point and drilling long to gift the Romanian the set.
The Latvian moved level on serve when Halep hooked a forehand wide and then earned another break to chalk up a fourth game on the trot.
She conjured up three set points with a laser forehand down the line, forcing the match to a third set with another sweetly-struck winner.
The Latvian stepped in to pummel a weak second serve for 15-40, with Ostapenko grabbing a huge slice of luck when a wayward backhand clipped the net and dropped just over for a 4-3 lead.
Halep, who saved match point against Elina Svitolina in the quarter-finals, had no response this time and Ostapenko sealed a stunning triumph with another break by hammering a backhand down the line.