British media reported a transfer fee of £4.5 million ($NZ7.8 million).
The 31-year-old won two Premier League titles, an FA Cup and two League Cups in seven years with City.
"When I came in 2010, honestly, I didn't expect to play so long," the Serbia fullback, who joined City from Roma's rivals Lazio in 2010, told City's website.
"Today is the day I have to say goodbye. For me, it's a very sad day. I am proud that I was part of making City the club that it is."
On joining Roma, he added: "I am extremely happy to be here," he said. "I will give 100 percent and more for Roma. My objective is always the same - to win."