The 20-year-old looked down and out when Halep had points for a 4-0 lead in the second set, but hit back with an audacious display of power to steamroller third-seeded Romanian Halep.
Ostapenko also recovered from a break behind in the third set and finished the contest with a flashing backhand winner to become the first unseeded player to win the title since Briton Margaret Scriven in 1933.
Not only that, but it was her first title of any kind, emulating the feat of Brazilian Gustavo Kuerten, who won his first Tour crown at Roland Garros in 1997 on the day Ostapenko was born.
Incredibly, she walloped 54 winners during the two-hour contest, matching her error count as she threw caution to the wind on a boiling hot day on Court Philippe Chatrier.
Halep’s steady approached looked like taking her to a first Grand Slam title, but she appeared drained at the end by the constant barrage coming from across the net.
Not only did the third seed fall short in the Roland Garros final for the second time, but defeat also cost her the World No 1 ranking that would have come with victory.
Ostapenko, who turned 20 on Thursday when she beat Swiss Timea Bacsinszky, threw her distinctive green headband into the crowd after a warm embrace with Halep, who look devastated.
“I mean I can’t believe I’m champion at 20,” Ostapenko, the youngest finalist for 10 years, said on court.
“I knew that Gustavo Kuerten won his first Roland Garros the day I was born, I have no words.
“There were a couple of games when everything went my way and I was ready to fight for every point.”