The world number five was 5-2 down against the 18-year-old Belgian before reeling off four frames in a row to snatch the victory.
Maguire produced a mix bag but did come up with some big breaks at key moments. While 4-1 down he produced a run of 99 and also enjoyed breaks of 68, 50 and then a final frame break of 91 during his comeback spin.
Brecel was in amongst the balls on a couple of occasions with chances to clinch the match, including in the final frame, but could just not get over the finish line.
"I didn't fancy that at all at 5-2," Maguire admitted after the match. "I'm just very relieved."
Ding Junhui progressed with a 6-1 victory over James Wattana, although the win was far less convincing than the score suggested with the normally composed Chinese player often showing signs of frustration as he presented his opponent with a host of openings.
There was no such trouble for Judd Trump who sailed past Dechawat Poomjaeng 6-0, falling short of a maximum break on the 13th black in the third frame.
"It was a good attempt; I had a kick and then got back into position but missed the black," said Trump. "It would've been nice to get it but the main thing was to get through to the next round where I'll have another chance.
"A lot of people thought there'd be a 147 in the early rounds but I think it may come towards the end of the tournament when you're getting pushed a bit.”
John Higgins hit an impressive 128 break en route to crushing Rod Lawler 6-1 to set up a third round tie with Jamie Burnett who fought back from 5-4 down to beat Chris Wakelin.
"I managed to nick the first frame. It was close but I think that sent the tone for the rest of the match,” said Higgins.
Matthew Stevens also escaped with a win as an incredible pink in the final frame saw him edge out Yu De Lu while Stuart Bingham beat the 'People's Champion' Jimmy White 6-2
Stephen Maguire 6-5 Luca Brecel
Ricky Walden 6-2 Peter Lines
Matthew Stevens 6-5 Yu De Lu
Scott Donaldson 6-5 Mark Davies
Li Hiang 6-4 Andrew Higginson
Jamie Burnett 6-5 Chris Wakelin
Anthony McGill 6-0 Chris Norbury
Stuart Bingham 6-2 Jimmy White
Mark Williams 6-3 Rory McLeod
Judd Trump 6-0 Dechawat Poomjaeng
Robert Milkins 6-5 Liu Chuang
John Higgins 6-1 Rod Lawler
Mark Allen 6-3 Dave Harold
Joe Perry 6-3 Daniel Wells
Ding Junhui 6-1 James Wattana