Havertz had struggled to make an impact in his first two Premier League games since sealing a reported £71 million ($94 million) move from Bayer Leverkusen as the most expensive signing of Chelsea's £200 million spending spree in the transfer market.
But the 21-year-old German was one of just three players to retain his place from Sunday's 2-0 defeat to Liverpool by Frank Lampard and that decision reaped its reward on a confidence-boosting night for the Blues.
Thiago Silva and Ben Chilwell also made their Chelsea debuts, while Tammy Abraham and Ross Barkley made the most of rare starts to get their names on the scoresheet.
Abraham pounced on loose pass deep in the Barnsley half to slam home the opener before Havertz's calm finish opened his Chelsea account.
A brilliant unselfish flick from Abraham teed Havertz up perfectly to convert his second and Barkley then drove home on his weaker left foot.
Havertz was due to be replaced by Chilwell 25 minutes from time but just completed his hat-trick in time by rounding Brad Collins before tapping into an empty net before Olivier Giroud completed the scoring.
Chelsea will face either Tottenham or Leyton Orient in the last 16 with the outcome of that tie yet to be decided after the match was postponed on Tuesday due to a number of coronavirus cases among the Orient players.
Arsenal won the only all-Premier League tie of the night as Christian Fuchs's own goal broke the deadlock at the King Power.
Eddie Nketiah added a late second for the Gunners, who could face Liverpool at Anfield twice in three days next week should the Premier League champions progress past Lincoln on Thursday.
Everton continued their fine start to the season with a 5-2 win at League One Fleetwood despite two howlers from England number one goalkeeper Jordan Pickford.
Carlo Ancelotti's men looked to be cruising into the last 16 when Richarlison's double gave them a deserved 2-0 half-time lead.
However, Pickford's attempted clearance was charged down for Mark Duffy to pull a goal back.
Alex Iwobi restored Everton's two-goal advantage before another Pickford mistake gave Joey Barton's men life again as he flapped Callum Camps's shot into his own goal.
Goals from Bernard and Moise Kean finally ended the tie as a contest, but Pickford's place for both Ancelotti and Gareth Southgate will come under increased scrutiny in the coming weeks.
Newcastle thrashed League Two Morecombe 7-0 with Joelinton scoring twice.
Miguel Almiron, Jacob Murphy, Isaac Hayden and Jamaal Lascelles were also on the scoresheet for Steve Bruce's men.
Fulham, Brighton and Burnley progressed 2-0 over Championship opposition in Sheffield Wednesday, Preston and Millwall respectively.
Stoke were the only non-Premier League side to go through on the night as they also beat lower league opposition in Gillingham 1-0.