The 33-year-old had been touted for a possible move to Inter Milan but has opted instead for a new deal until 30 June, 2022 with the capital side.
“I realised just how much they wanted me to stay,” Dzeko, who joined the club in August 2015 from Manchester City, told the club’s website.
“Here there is everything we need to win something and I am delighted to be able to stay here even longer.”
Dzeko has played 179 times for Roma and scored 87 goals. He was the Serie A top goalscorer during the 2016-17 season, Firstpost reports.