The 22-year-old, who has been linked with Wolves, Wigan, West Ham and Fulham since Boro's relegation from the Premier League, has committed himself to the club until 2012.
That will come as a huge boost to manager Gareth Southgate, who used him both at the back and in central midfield following his return from a third cruciate ligament operation last season.
Southgate had made the Stockton-born player's retention one of his priorities as he plots a swift return to the top flight.
Chief executive Keith Lamb said: "We are delighted Matthew has decided to commit his future to Middlesbrough.
Bates, a member of the club's FA Youth Cup winning side in 2004, has endured an injury nightmare since breaking into the senior squad.
However, his form at the end of last season impressed Southgate, particularly when he was asked to plug a gap in the middle of midfield.
But the drop into the Championship left Bates with a desperately difficult decision to make as his existing deal drew to a close.
Asked last month if staying at the Riverside was his preferred option, he said: "Yes, it, of course it is.
"It's the club I support, it's the club my family support.
"But it's a big decision for my future as well. I am out of contract in the summer and ultimately, I would like to stay in the Premier League.
"It's going to be a very difficult decision to make either way whatever I do, and it is going to be an important one as well."