The 58-year-old was fired from Tottenham on April 19 but will take over at the Serie A club from Paulo Fonseca for the 2021/22 campaign.
It sees a return to Italy for Mourinho following a triumphant spell with Inter Milan over a decade ago where he won the treble, including the Champions League.
The Giallorossi have picked up just one point from their last four league games and sit seventh in the table, nine points behind sixth-placed city rivals Lazio with four matches remaining, prompting Fonseca’s departure.
Roma president Dan Friedkin said in a statement on the club website: “On behalf of everyone at AS Roma, we would like to thank Paulo Fonseca for the hard work and leadership shown during these two years.
“Paulo led the team through several challenges, including the Covid pandemic and a change of ownership, and he did so with generosity, fairness and great character.
“We wish him all the best in his future endeavours and we are confident that he will represent fantastic added value wherever he goes.”