The 58-year old signed a deal that will expire in December of 2021.
"I'm very happy to be part of this great nation," he said, referring to the Flamengo support. "We are going to fight to win titles and we'll see each other soon."
Before joining Guardiola at Barca in 2007 he coached three clubs in his homeland Spain.
He faces a tough task trying to repeat the success of Jesus, who had a spectacular one-year stay. The Portuguese, who became an icon at Gavea, led Brazil's best-supported club to their first Brazilian first division title since 2009, their first Copa Libertadores since 1981 and a Rio de Janeiro state championship.
In December, Flamengo came within a goal of lifting their second Club World Cup title but fell in extra-time to Liverpool.
Torrent topped the Eastern Conference with NYCFC last season but left his post shortly after an October playoff defeat to Toronto FC.
Information from Reuters was used in this report.