After Bryan Mbeumo had an early goal ruled out for offside, Newcastle raced into a 2-0 lead with goals from Bruno Guimaraes and Jacob Murphy.
Former United striker Ivan Toney pulled a goal back for Brentford from the penalty spot early in the second half before Guimaraes quickly restored the two-goal advantage.
Miguel Almiron added some gloss to the scoreline with his fourth of the season to make it 4-1.
Joelinton then forced Ethan Pinnock to put the ball into his own net late on to make it 5-1.