Roy Keane’s men claimed the Wear-Tees bragging rights and the points which make relegation an impossibility thanks to Murphy’s injury-time header in a thrilling Stadium of Light encounter.
The game looked to be heading for a draw when Boro’s record signing Afonso Alves (73) fired home an equaliser.
The Teessiders had got off to the perfect start when Tuncay Sanli (4) gave them the lead, but Danny Higginbotham equalised within two minutes.
Michael Chopra made it 2-1 in first-half injury time and then passed up another chance before Alves looked to have snatched a point for Boro.
But with time running out Murphy caught Brad Jones all at sea at the near post to nod home Grant Leadbitter’s corner.