The 29-year-old's deal was due to expire at the end of next season but he has agreed a renewal, tying him to the club until 2021.
Since joining in January 2016, Perotti has made 78 appearances and scored 17 goals, the latest of which came in Tuesday's 1-0 victory over Qarabag as Roma secured top spot in UEFA Champions League Group C.
"From the first game, I have felt very at home here," said Perotti, who made his first Argentina appearance in almost seven years last month.
"I have enjoyed some of the best moments of my career here and I hope to experience many more. I'm very happy."
Sporting director Monchi said: "The bond I have with Diego is special. I had the fortune to observe his first steps in European football in person at Sevilla, and now I have the pleasure to assist him as he becomes a valuable player at a great club like Roma."
Eusebio Di Francesco's side are fourth in Serie A, five points adrift of leader Inter but with a game in hand.