Boro are winless in their last 10 Premier League games and currently sit in the relegation zone, three points from safety with 11 games remaining.
They are also the league’s lowest scorers with just 19 goals and were knocked out of the FA Cup by Manchester City last weekend.
Assistant head coach Steve Agnew will take control of the first team.
“This club will always hold a special place for me,” said Karanka, 43.
“I’d like to thank Middlesbrough for a wonderful opportunity and the players, staff and all the people at the club who I have worked with.”
The former Real Madrid assistant manager took over at the Riverside in November 2013 to become Middlesbrough’s first ever non-British boss.
Boro secured automatic promotion to the Premier League last season.
The club met with Karanka and following discussions, Boro said it was in their “best interests” to make the change.
By BBC SPORT