The 58-year-old Portuguese, who has won 25 trophies in his managerial career, was fired from Premier League team Tottenham Hotspur in April after a 17-month tenure.
Mourinho will take over the Italian side ahead of the 2021-22 campaign. The contract runs until June 30, 2024.
“The incredible passion of Roma fans convinced me to take the job and I can’t wait to start next season,” Mourinho said in a statement.
Roma announced earlier Tuesday that current manager Paulo Fonseca will leave his role at the end of the current season.
The club suffered a heavy 6-2 loss to Manchester United in the Europa League semi-finals last week and are currently seventh in the league.
“We are very pleased to welcome José Mourinho to the AS Roma family,” said Roma President Dan Friedkin and Vice President Ryan Friedkin in a statement.
“José is a great champion who has won trophies at all levels. He will bring tremendous leadership and experience to our ambitious project.
“The appointment of José is a big step towards building a long-term and consistent profit culture across the club.”
Mourinho is one of the game’s most famous and successful managers and has previously coached Real Madrid, Manchester United, Inter Milan and Chelsea, among others.
“I think my nature is really humble. But sometimes, because I say things that are so straightforward, the perception is that I’m not a humble type. I think I sell a lot.
It is the second time that Mourinho has worked in Serie A. He was Inter Milan coach from 2008 to 2010 and led the team to a remarkable triple in its final season – the Serie A, Coppa Italia and Champions League titles.
After leaving Tottenham and his track record in sport, many wondered what was next for Mourinho.
He told The Times on Saturday that he would only take a job in what he thought was a competitive league.
“In Germany and France you know that when you go to Club A or Club B, you know that your fate is written immediately,” he said.
“It’s all about the pressure. I want it. I would always choose pressure. Sometimes this pressure becomes unbalanced or disproportionate, but I reject the opposite! I refuse to go to a country where the pressure does not exist. I refuse!”