Andraz Sporar opened the scoring for the visitors with a 35th-minute penalty and the lead was doubled courtesy of Martin Payero in the 74th minute.
The Bluebirds dropped their eighth straight match with manager Mick McCarthy and assistant manager Terry Connor leaving the club by mutual consent following the game.
Story of the match
Cardiff went close inside the first five minutes as James Collins' shot was goal bound before being blocked by a Middlesbrough defender.
Payero saw a low drive go wide following a pass from Marcus Tavernier. Sol Bamba was denied a fairytale return to his old stomping ground when Bluebirds goalkeeper Alex Smithies pushed away his goal-bound header.
Boro thought they had a penalty when Collins slid in with arms raised to block a cross by Onel Hernandez and shortly after the Bluebirds were penalized.
Sporar’s speculative effort was handled by Mark McGuinness in his own area. The Slovenian stepped up and beat Smithies straight down the middle for his third goal of the season.
The visitors should have doubled their lead less than five minutes later. Payero turned into space in the center of the park and played Matt Crooks through one-on-one with Smithies, but he dinked his effort past the post.
Smithies did well to get a hand to Ikpeazu's effort, sending it into the side netting, the last meaningful chance of the first half.
The second half saw a much-improved Cardiff side, Joe Lumley making a brilliant reflex save from Ruben Colwill's thundering volley from close range.
Middlesbrough were fortunate to keep their lead as a bouncing header by Aden Flint struck the woodwork and was scrambled clear by Bamba.
Kieffer Moore almost made a swift impact as the halftime substitute beat Lumley to Ryan Giles' corner delivery, only to head over the bar.
At the other end, Sporar picked out Payero, who curled narrowly wide, but the Argentine did open his account when Sporar laid off for him and he finished low into the bottom corner.
Man of the match: Martin Payero
There were many terrific performances put in by Middlesbrough, Bamba returning to face his old club and anchoring the Boro back-line and Sporar had a goal and an assist, but Payero opened his account and provided positivity and quality to drive the club forward.