Carroll had netted a superb opener in Tuesday's 3-0 win over Crewe Alexandra at Queen Ethelburga's Collegiate and his 26th-minute strike here was another excellent finish as he swept home from Matt Ritchie's left-wing cutback.
The Tykes levelled through Marcel Ritzmaier in the 54th minute, but Murphy converted a late penalty - having won the spot kick himself with some determined play.
On a cold and windy afternoon on North Tyneside which saw Jeff Hendrick make his Magpies debut, clear-cut chances were few and far between.
Karl Darlow made a great save in the first half to thwart Conor Chaplin while Matt Ritchie was denied by Brad Collins in the second, moments after Barnsley had levelled.
Substitute Murphy was denied a goal by what seemed to be a clear handball on the line in the 72nd minute, but then, five minutes later, he was brought down in the box after a strong run on the right and fired home the winner from the spot.
Miguel Almirón had an opportunity to get his name on the scoresheet after that, before Murphy saw another goalbound effort deflected just wide, but the forward - who looks full of confidence after a successful loan spell with Sheffield Wednesday last term - had already done enough to help make it two wins out of two in pre-season for Steve Bruce's side.
Newcastle United: Karl Darlow (Mark Gillespie 46), Emil Krafth, Federico Fernández (Florian Lejeune 60), Ciaran Clark (DeAndre Yedlin 61), Paul Dummett (Javier Manquillo 61), Jeff Hendrick (Jacob Murphy 61), Isaac Hayden (Henri Saivet 74), Jonjo Shelvey (Daniel Barlaser 74), Matt Ritchie (Christian Atsu 61), Sean Longstaff (Miguel Almirón 61), Andy Carroll (Allan Saint-Maximin 61)