More than three decades after he took charge of his first Football League game as manager of Scarborough, Warnock watched goals from Jonny Howson and Chuba Akpom secure his first home league win as Boro boss.
The 71-year-old was back on the touchline after recovering from Covid-19, and he will have enjoyed his afternoon much more than his Barnsley counterpart Gerhard Struber, who saw his side slump to their third league defeat of the season despite Cauley Woodrow's late penalty.
Middlesbrough were the better side from the outset, although it took until first-half stoppage-time for them to make their superiority count.
The hosts should have claimed the lead in the 14th minute, but having opened his Boro account in last weekend's 1-1 draw at QPR, Akpom passed up a glorious opportunity to score again.
He would eventually make it two goals in two games in the second half, but he failed to profit when Mads Andersen's error enabled Britt Assombalonga's through ball to make it into the Barnsley area, leaving him with a clear run on goal. The £2.75million signing from PAOK Salonika had plenty of time to pick his spot, but side-footed wide of the target.
Bradley Collins tipped George Saville's header around the post as Boro continued to create chances, and Akpom thought he had opened the scoring, albeit inadvertently, shortly after the half-hour mark.
Sam Morsy's shot hit the striker on the back as he turned towards the Barnsley goal, and the deflection completely wrong-footed Collins, resulting in the ball ending up in the net.
Akpom spun away to celebrate, but he had been in an offside position when Morsy shot and after a consultation between referee Oliver Langford and his assistant, the effort was rightly chalked off.
Boro deserved to be ahead on the balance of play, and the deadlock was finally broken in first-half stoppage-time.
Marcus Tavernier cracked an excellent 25-yard free-kick against the crossbar, and after Saville got up to knock down the rebound, Howson swivelled neatly to hook home a slick half-volley.
Barnsley's only first-half opportunity came to nothing when Alex Mowatt curled wide after a one-two with Dominik Frieser, and the Tykes' task became even tougher when Middlesbrough doubled their lead three minutes into the second half.
Collins could only parry Tavernier's 20-yard strike into Akpom's path, and the former Arsenal trainee slotted home the rebound.
Luke Thomas looped a shot over the crossbar via a deflection off Saville as Barnsley tried to get back into the game, and the visitors claimed their first league goal of the season in the 89th minute.
Howson fouled Woodrow and the striker dusted himself down before converting from the penalty spot.