The goal was Albion's first away from home for more than 11 hours and gave the 911 Seagulls fans in attendance reason to celebrate on the way home from the Riverside Stadium, after heartbreak the last time the sides met.
The only goal came with seconds of normal time remaining when Markus Suttner crossed from the left and George Friend's clearance canonned off Murray and past Boro keeper Darren Randolph, who had no chance in keeping it out.
Brighton made seven changes from their 4-0 defeat to Chelsea last week, with Connor Goldson, Suttner, Dale Stephens and Tomer Hemed the only players to keep their place in the starting 11.
Sam Baldock made his first start of the season, while Liam Rosenior - who captained the side - and Jiri Skalak featured for the first time since September.
Middlesbrough made just three changes from their 3-0 win at Queens Park Rangers last week, as Adam Clayton, Martin Braithwaite and Ashley Fletcher came in for Grant Leadbitter, Britt Assombalonga and Stewart Downing.
In a quiet opening, Boro striker Fletcher fired well wide from 20 yards inside 90 seconds, before Braithwaite headed over the bar from 12 yards after George Friend's cross picked him out on 14 minutes.
At the other end, Albion forced a couple of early corners which came to nothing and Markus Suttner curled a 22-yard free kick over on 17 minutes.
Fletcher had another opportunity on 20 minutes but failed to divert the ball goalwards from seven yards after skilful play down the right by Adama Traore saw him get away from Suttner and Beram Kayal.
The hosts should have taken the lead on 29 minutes when Braithwaite's corner found Daniel Ayala unmarked six yards out, after Connor Goldson slipped, but the Middlesbrough defender could only head straight at Tim Krul.
Albion have conceded the most goals from set-pieces in the Premier League, so could count it as a real let-off.
Boro went close again just two minutes later when Ryan Shotton's long throw reached Patrick Bamford and his acrobatic overhead kick from ten yards went just over.
Middlesbrough continued to create all the openings and were denied by the woodwork on 40 minutes. They broke quickly and Traore, who was causing all sorts of problems down the right, saw his powerful drive pushed against a post by Krul.
Albion had the first opportunity of the second half on 57 minutes as Beram Kayal's blistering 25-yard strike was parried by Darren Randolph, who then bravely blocked Jiri Skalak's follow-up. Both players received treatment after the incident and Skalak was forced off and replaced by Jose Izquierdo.
Ayala headed over at the back post after Ben Gibson flicked on substitute Stewart Downing's free kick on 62 minutes.
Izquierdo was straight into the action after his introduction but dragged a shot well wide of Randolph's goal on 64 minutes after cutting in from the left.
As the game began to open up, Kayal blazed over from 15 yards at the near post on 67 minutes, before Traore fired inches wide of Krul's right-hand post from 25 yards seven minutes later.
Izquierdo turned and shot left-footed straight at Randolph on 79 minutes and Anthony Knockaert then blazed well over from 25 yards on 86 minutes as Albion pressed for a winner.
Brighton did get reward for their late pressure in the final seconds of normal time when Murray's fortutious goal took them into the fifth round.
MIDDLESBROUGH: Randolph; Shotton, Ayala (Fry 65), Gibson, Friend; Traore, Clayton, Howson, Braithwaite (Downing 56); Bamford, Fletcher (Assombalonga 56). Subs: Dimi, Leadbitter, Fry, Johnson, Christie.
BRIGHTON: Krul; Rosenior, Hunemeier, Goldson, Suttner; Knockaert, Stephens (Propper 45), Kayal, Skalak (Izquierdo 61); Hemed (Murray 72), Baldock. Subs: Maenpaa, Dunk, Gross, Murray, Izquierdo, Schelotto.