Yanic Wildschut gave Boro the lead before Christian Stuani doubled their advantage before the break.
Stuani netted his second and Middlesbrough’s third before Danny Philliskirk pulled a goal back in the dying minutes of the game as they knocked Latics out of the competition for the second season in succession.
Goalkeeper David Cornell had saved Adam Clayton’s penalty as the scores remained goalless.
It was almost a perfect start for Latics as Lee Croft struck inches over the crossbar from 30 yards in the first five seconds of the game.
Middlesbrough had two opportunities on three minutes to take the lead as Emililo Nsue struck wide whilst Stuani missed his kick from six yards.
In what was turning into a frantic opening, Boro were awarded a penalty on seven minutes as Cornell brought down Diego Fabbrini in the area, receiving a yellow card.
Clayton stepped up but the goalkeeper redeemed himself, diving the right way to deny the former Huddersfield Town man from the spot.
Latics looked to capitalise on the penalty save and had the momentum with them.
In an attacking opening 10 minutes, Latics took the game to their Championship opposition going close on several occasions.
Danny Philliskirk was the first to test the goalkeeper from 12 yards before Jonathan Forte’s shot a minute afterwards deflected wide.
The fans really got behind the side and the players responded but Brian Wilson’s cross went over the head of Forte at the back post.
The game started to calm down and the Championship side started to hold the ball and dictate possession.
Cornell was forced into action on 18 minutes tipped Fabbrini’s cross wide but he could not prevent Middlesbrough taking the lead on 23 minutes.
Winger Albert Adomah played an inch-perfect through ball to the onrushing Wildschut who slid the ball past Cornell to give the visitors the lead.
That took the stuffing out of a lively Latics as the Championship side’s superiority started to show.
On 37 minutes, Latics could have been awarded a penalty kick as Daniel Ayala looked to handle in the area but referee Carl Boyeson waved away Latics’ protests.
The visitors extended their lead on 41 minutes through Stuani. Fabbrini got to the byline, crossed into the centre where Stuani was standing for him to power past Cornell from six yards.
Latics needed a response after the break and went close on two occasions minutes after the restart.
Firstly Carl Winchester struck straight at the goalkeeper on the volley from 18 yards whilst Philliskirk also tested the palms of the Boro stopper.
Jake Cassidy had a great opportunity to open his account for Latics on the hour mark but he just overran the ball as he raced through on goal.
Latics would come to rue that missed chance as Boro trebled their lead a minute later as Stuani grabbed his second of the game.
James Husband crossed the ball into the box for the striker waiting at the back post and he made no mistake from six yards.
Athletic almost hit back instantly as substitute David Dunn surged into the penalty area before feeding Philliskirk in the centre but the goalkeeper saved his shot well.
Boro brought on last season’s goalscorer Grant Leadbitter and £7 million man Stewart Downing to signal the gulf in class between the two sides.
However, Latics continued to plug away and with 15 minutes remaining, Philliskirk unleashed a stinging effort which Tomas Mejias saved well.
The game was in Middlesbrough’s control and they almost made it four on 81 minutes but Cornell saved well after Adomah’s intelligent run down the right.
Latics ended the game strongly as Philliskirk’s initial shot was blocked and Dunn’s follow up from 25 yards was tipped around the post by the impressive Boro goalkeeper.
Dunn was having a strong influence on this game and almost pulled a goal back for Latics as his volley on the turn was tipped over the crossbar.
Latics did pull a goal back deep into added on time as Philliskirk nodded home at the front post from a good ball into the box but it was Middlesbrough that progressed through to the next round of the competition.
Oldham Athletic: Cornell, B.Wilson, J.Wilson, Gunning, Mills, Kelly, Philliskirk, Winchester (Poleon 60’), Croft, Forte (Dunn 60’), Cassidy (Turner 84’).
Subs not used: Coleman, Brown, Burn, Green.
Middlesbrough: Mejias, Husband, Clayton (Leadbitter 69’), Nsue, Stuani, Fabbrini (Downing 73’), Ayala (Fry 84’), Forshaw, Wildschut, Stephans, Adomah.
Subs not used: Konstantopoulos, Friend, Kike, Kalas.
Goals: Oldham Athletic (Philliskirk 90+3’) 1-3 Middlesbrough (Wildschut 23’, Stuani 41’, 61’)
Attendance: 4,182 (1,270 visiting supporters)