Halep will face Brazil's Beatriz Haddad Maia, a 6-4 7-6 (7) winner over 14th-seeded Karolina Pliskova of the Czech Republic in the night semifinal.
Halep smashed a racket on the hard court at Sobeys Stadium after she missed a return late in the third set.
"The fire is back," Halep said.
"It's a good sign if I do that. It looks like I'm fighting. It helps me sometimes. I don't know if it's always good or not, but it helps me."
The 15th-seeded Halep won the tournament in Montreal in 2016 and 2018. Pegula was seeded seventh.
Haddad Maia reached her first WTA Masters event final. In June, she won consecutive grass-court events in Nottingham and Birmingham in England for her first two tour titles.
"I just try to breathe a little bit more. I try to calm down and think about what I need to do and not what I'm experiencing," Haddad Maia said.
"I try to play every point and think about the next shot.
She beat top-ranked Iga Swiatek in the round of 16.
"I don't think about, Oh, I'm here playing against No. 1 in the world in a big stage in a 1000 WTA,' because otherwise I wouldn't be able to play," Haddad Maia said.
Halep won the Melbourne Summer Set 1 to open the season for her 23rd title, and first since since 2020. She began working with coach Patrick Mouratoglou in April and said he has rekindled her passion for tennis, pointing to training sessions at his tennis school in the French Riviera.
"The person next to us, Patrick, he brought it," said Halep, gesturing toward Mouratoglou.
"The vibe from the academy gave me the energy. To see all those kids fighting every day to touch the dream that they have. I felt that I still can do it. I still have it inside myself."