The 21-year-old Spain international has signed a contract until the summer of 2027 and will be officially unveiled as a Barcelona player on January 3.
Torres only joined the Premier League champions at the start of last season from Valencia for £20m and he leaves the Etihad Stadium with one top flight medal and as a League Cup winner.
A foot injury sustained while on international duty with Spain in October has restricted Torres to just seven appearances this season, but he has still found the back of the net three times.
He made 43 appearances across all competitions in his 18 months at Man City, scoring 16 goals.
"FC Barcelona has reached an agreement with Manchester City for the transfer of Ferran Torres," read Barca's statement.
"The player has signed a contract for the next five seasons, until 30 June 2027, and his buyout clause has been set at 1,000 million euros."
In a statement confirming Torres' departure, City director of football Txiki Begiristain said: “Ferran should be proud of what he has achieved here at Manchester City.
“Last season was his first time in a new country, but he adapted well. He always gave 100%, worked hard for the team and scored goals which helped us win trophies.
“Injury unfortunately prevented him from playing more games this season, but Ferran is a player we have all enjoyed working with and we wish him all the best at Barcelona and for the rest of his career.”
Torres has won 22 caps for Spain and scored 12 goals.