Downing, capped 35 times by England, steps down a division to re-join his home-town club in a deal worth £5.5m that could rise to £7m if Boro are promoted.
The 30-year-old graduated from the Middlesbrough academy and made 234 appearances for the club before leaving for Aston Villa at the end of the 2008-9 season.
Boro head coach Aitor Karanka was delighted to complete the signing of the player and he said: “It’s an amazing signing for us. He’s more than just a player.
“Nobody expected him to come here, but he wants to be here, and is completely committed to the club and the team. He is a very good person and I’m excited to work with him.”
Downing spent two years at Villa Park before joining Liverpool and then moved on to West Ham at the start of the 2013-14 campaign, where he played a regular role over the last two seasons.
Middlesbrough narrowly missed out on promotion under Karanka last season, as they were beaten by Norwich City in the Championship play-off final at Wembley in May.
Downing will now fly out to Marbella to link up with Karanka and the rest of the Boro squad.
He told the club’s official website: “I always said I wanted to come back to this club and I’m delighted the chance has now come. I didn’t put a time limit on it but now the circumstances are right.
“There was a shout about me coming back here on loan when I was at Liverpool, but for one reason or another it didn’t happen. But now I’m here, and I’m absolutely buzzing.
“This is a good time to be coming back to Boro, and hopefully I can enjoy another four to five years playing at the top.
“This is a Premier League club with a really good team and they were so unlucky to lose out on promotion last season. Nothing went right for them in the play-off final against Norwich but over the course of the season I think they deserved to go up.”