Local lad Hayden Hackney scored the only goal of the closely-fought contest midway through the first half to ensure that Michael Carrick's men take a one-goal advantage into next week's second leg at Stamford Bridge.
Mauricio Pochettino's side boasted over 70% possession and had a total of 18 shots on goal, but they ultimately lacked a cutting edge in the final third, much to the frustration of the travelling Blues supporters.
Middlesbrough made a bright start to the contest, but they were dealt a huge blow inside the opening 20 minutes as both Emmanuel Latte Lath and Alex Bangura were forced off with injuries.
With no VAR in the EFL Cup, Chelsea were fortunate not to conceded a penalty in the second minute after Axel Disasi made a crunching tackle into the ankle of Latte Lath, whose initial shot rolled wide of the far post.
Middlesbrough's No.9 was withdrawn after attempting to continue to no avail, before Bangura hobbled off with an apparent hamstring injury after tracking back well to intercept Noni Madueke on Chelsea's right - Boro's injury tally has now increased to an alarming 14 as a result.
In between both injuries for the hosts, Cole Palmer - operating as a false nine - fired Chelsea's first shot on target straight down the throat of Tom Glover, before Blues captain Conor Gallagher sent a volley well over the crossbar following a corner.
Palmer was then presented a huge chance to open the scoring just after the half-hour mark when Jonny Howson's misplaced pass played the Chelsea star through on goal, but he dragged his left-footed shot inches wide of the right-hand post.
Middlesbrough capitalised on that missed opportunity from the Blues, as the hosts broke the deadlock just five minutes later when Hackney calmly slotted home a first-time finish from six yards out after pouncing on a low delivery from dynamic winger Isaiah Jones, who caused havoc down the right flank for Levi Colwill.
Chelsea controlled possession in the closing stages of the first half in search of an equaliser, and they came close to restoring parity when Moises Caicedo fizzed a low-driven shot from outside the area narrowly wide.
Glover then fumbled what should have been a comfortable catch following a curling strike from Enzo Fernandez, but his blushes were saved as Palmer somehow failed to hit the target with a cushioned first-time volley from inside the six-yard box.
Palmer had one more attempt before the half-time whistle blew, but as he checked inside onto his favoured left foot and fired a tame shot on goal, Glover got down well to his right to make the save before collecting the rebound off Howson.
Seven minutes after the break, Fernandez teed up Madueke with a perfectly-weighted delivery from the edge of the area, but the latter was unable to generate any pace on his header which was comfortably collected by Glover.
Middlesbrough looked defensively sound, but aside from the threat down the right from Jones on the counter-attack, they offered little going forward, and it seemed only a matter of time before Chelsea pilled on the pressure heading into the final 30 minutes.
Shortly after Gallagher fired a sliding shot narrowly wide of the far post, Pochettino called upon substitutes Armando Broja and Mykhaylo Mudryk in the hope that they could provide the much-needed clinical touch in front of goal - Madueke and Fernandez both made way as a result.
Mudryk was teed up by Sterling on the 73-minute mark, but he could only curl his shot straight at Glover, before the latter cut inside from the left and blazed a right-footed shot well over.
Broja, who rarely threatened for Chelsea after making his introduction off the bench, then rolled an inviting delivery across the face of goal that just evaded Sterling, before Dael Fry threw his body in front of a shot from Gallagher.
Concentration was key for Middlesbrough as they defended frantically in the final 10 minutes, and they admirably managed to quell the threat of Chelsea to hold on for an impressive win, keeping their dreams of reaching Wembley firmly alive.
Chelsea will look to return to winning ways when they welcome West London rivals Fulham to Stamford Bridge for a Premier League clash on Saturday, while Middlesbrough travel to The Den to take on Millwall in the Championship.