The third-seeded Halep, who reached her first major final at Roland Garros in 2014, struggled from the start on Court Suzanne Lenglen and was overpowered in the second set, slumping to her second straight defeat against her 70th-ranked opponent. The Croatian had also beaten Halep at the US Open last year.
"It was difficult because I didn't feel the game," Halep said. "I don't have a good feeling of my game, and that's why I couldn't change something."
Lucic-Baroni hit an ace on match point and raised both arms in delight. She finished with 29 winners, compared to five for Halep.
"It's incredible; she's just a great champion and I respect her so much," Lucic-Baroni said. "It's such a huge win."
Up next for the Croatian is local favorite Alize Cornet.
"I wish at least three French people will cheer for me in that match," Lucic-Baroni said.
Earlier, defending champion Maria Sharapovasaved four of the five break points she faced and limited her mistakes to just eight unforced errors as she beat Russian Fed Cup teammate Vitalia Diatchenko 6-3, 6-1.
The second-seeded Sharapova's main focus at the moment is to fully recover from her cold after winning the Italian Open. She was booed Monday after she had skipped the on-court postmatch interview, citing her illness as the reason.
"For me right now it's really about recovery and just being healthy for the next round," said Sharapova, who is bidding to become the first player to retain her title in Paris since Justine Henin in 2007. She also won in 2012.
"Fortunately I played a lot of tennis in the previous two tournaments, and this is not a stage where you're trying to fix things or work on things. It's really about maintenance and recovery and getting ready for the next match."
The victory set up a third-round meeting with 2010 runner-up Samantha Stosur, who advanced with a 6-0, 6-1 victory overAmandine Hesseof France.
Said Sharapova of Stosur: "There are a lot of untraditional things she does, but I enjoy that challenge."
The rout extended Stosur's winning streak to seven matches after she arrived in Paris on the back of her first title this year in Strasbourg.
The 26th-seeded Stosur has not beaten Sharapova since a match on hard court in Tokyo three years ago, with Sharapova boasting a 14-2 career record against the Australian veteran.
"Playing Maria is always a big challenge for me," Stosur said. "No matter what surface it's on, I don't have a very good record at all. ... But I know I've got the game that can trouble her, and hopefully I can do it well and we will see what happens."
Stosur can take confidence from their previous match on the Parisian clay in the fourth round last year, when she led 6-3, 4-3 before Sharapova won the next nine games.
"She fights from the first point to the last point. Doesn't give much away, and, you know, when her back is against the wall she keeps swinging and going forward," Stosur said. "She can make that ball on the line and, then, all of a sudden get herself back into it. She's one of those players that you have to go at the whole time and not let up."
After reuniting last month with former coach David Taylor, Stosur is hitting form at the right time. Before Strasbourg, where the 2011 US Open champion won a seventh career title, Stosur had won back-to-back matches just once in 10 tournaments.
She said her good spell of form is mainly due to her renewed partnership with Taylor.
"I think going back with Dave, that's given me confidence," Stosur said. "That's probably a contribution, and then playing on a surface that I feel good on. Been able to get over a couple of injuries again. It all I guess makes for a better kind of couple of weeks."
Among other seeded women to advance were No. 11 Angelique Kerber, No. 13 Lucie Safarova and No. 20 Sabine Lisicki.
The Associated Press contributed to this report.
How Lucic-Baroni stunned Halep
Mary Joe Fernandez and Patrick McEnroe break down the keys to Mirjana Lucic-Baroni's upset of Simona Halep.
Sharapova cruises in second round
Maria Sharapova topped Vitalia Diatchenko 6-3 6-1 to advance to the third round at the French Open.
Maria talks win, cold
Maria Sharapova talks about her second-round win over countrywoman Vitalia Diatchenko and the cold she's been fighting at the French Open.
Stosur breezes through second round
Samantha Stosur crushed Amandine Hesse 6-0, 6-1 to advance to the third round at the French Open.