A stoppage-time goal by Patrick Kisnorbo gave Hearts a crucial two-goal lead after the first European tie to be played at Murrayfield Stadium.
Andy Webster gave Hearts a deserved lead after the break against Braga when he headed home a Mark de Vries knock-down early in the second half.
Paul Hartley volleyed Hearts into a two-goal lead, only for Paulo Sergio to head the visitors' goal a minute later.
But Kisnorbo drove home Hearts' third following a Hartley corner.
Hearts had been forced to move the tie to the nearby home of Scottish rugby as Tynecastle Stadium no longer meets Uefa requirements.
The 67,500-capacity stadium dwarfed the 18,000 attendance at the Uefa Cup first-round, first leg tie.
Hearts had been also forced to make one change from Sunday's draw with Rangers, defender Jamie McAllister replacing Graham Weir, the striker suffering from mumps.
McAllister made an instant impact, sending a shot across the face of the Braga goal that flew just past the post from the edge of the 18-yard box.
Hartley sent in a 35-yard free-kick that was well held by goalkeeper Paulo Santos.
Hearts nearly went ahead seven minutes before the break when Mark de Vries set up Phil Stamp only for the goalkeeper to claw the stand-in striker's volley clear of the goal and McAllister hit the rebound well over the crossbar.
Braga almost snatched an undeserved lead when it needed a great save from goalkeeper Craig Gordon to stop a Junior drive following a mistake by Webster.
Webster made up for that when Joe Hamill spotted de Vries unmarked at the far post and the big striker nodded into the path of the defender to bullet a header home from inside the six-yard box.
Hearts nearly extended their lead a few minutes later, when Stamp unleashed a thunderous shot from 25 yards that crashed off the crossbar.
Gordon blocked another Junior effort at the other end before Hearts went two goals in front.
Robbie Neilson's cross was met by a superb volley from Hartley.
Their joy was short-lived, when Braga pulled a goal back a minute later, Paulo Sergio heading home Junior's free-kick.
Subsitute Dennis Wyness missed a chance before Kisnorbo struck the third for Hearts a minute into stoppage time.
Hearts: Gordon, Neilson, Pressley, Webster, Maybury, Hamill (MacFarlane 81), Kisnorbo, Hartley, Stamp (Wyness 79), McAllister, de Vries.
Subs Not Used: Moilanen, Janczyk, Sloan, Berra, Stewart.
Booked: Kisnorbo, Gordon.
Goals: Webster 52, Hartley 62, Kisnorbo 90.
Braga: Paulo Santos, Abel, Paulo Jorge, Nunes, Jorge Luiz, Luis Loureiro, Vandinho, Kenedy, Paulo Sergio (Cesinha 75), Baha (Jaime 37), Wender.
Subs Not Used: Cicero, Mauricio, Joao Tomas, Marco, Barroso.
Goals: Paulo Sergio 65.
Ref: Anton Genov (Bulgaria).