Doubts surfaced over the former Italy international's future earlier in the season after reports of a row with manager Luciano Spalletti.
However, Roma have moved to retain the services of their captain for another season.
"I really desired this contract, which is the realisation of my dream," Totti told Roma TV.
"I always hope to end my career having worn a single shirt, that of Roma.
"After speaking with the president [James Pallotta] I am even more convinced that by remaining united we can achieve great things."
READ MORE | RUMOURS: United join Pjanic race
Totti joined Roma as a 12-year-old in 1989 and, since making his debut in 1993, has made 758 appearances in all competitions and scored 304 goals – both of which are club records.
President Pallotta lauded the signing of his contract as a symbolic moment on the club's 89th anniversary.
"It's quite fitting that on the anniversary of the day AS Roma was founded, Francesco Totti has signed a new playing contract," he added.
"No one has played more games or scored more goals for this football club than Francesco Totti and we're delighted that he will continue for one more season.
"He's earned this contract and now we want Francesco's final season on the pitch to be the start of a new era of success for Roma."