The World Cup winner, 42, spent his entire professional career at Roma and retired from playing in July 2017.
His relationship with president James Pallotta reportedly deteriorated, but last week the American said he offered Totti the role of technical director.
Roma finished sixth last season and missed out a Champions League place.
“I resign as a Roma executive,” said the Italian former forward, speaking at a news conference that lasted well over an hour. “I was hoping that this day never came, instead this ugly and heavy day has arrived.
“I never had the chance to work on the technical area with Roma.”
He added: “This is far worse than retiring as a player. Leaving Roma is like dying. I feel like it’d be better if I died.”
Totti criticised the club’s American ownership and the influence of former director and now club consultant Franco Baldini.
“This is a club to be loved and supported,” he added. “There shouldn’t be pro-Totti, pro-Pallotta or pro-Baldini factions. Just Roma fans.
“As I said, presidents pass, coaches pass, players pass, but the flags do not.
“They knew my intentions and what I wanted, to give so much to this club and team, but they never wanted me to, in all honesty. They excluded me from every decision.”
Totti’s exit follows former team-mate Daniele de Rossi, 35, who left the club at the end of last season after 18 years.
“The main focus of certain people has been to remove Romans from Roma,” Totti claimed. “In the end, the truth came out, because they achieved what they wanted.”
Totti joined Roma’s youth academy in 1989, making his senior debut in 1993 as a 16-year-old. He went on to score 307 goals in 785 games, winning Serie A in 2001 and the Coppa Italia twice. He also won 58 caps for Italy.
He said the only way he would return to the club is under new ownership.
“If I was the president of Roma and had two icons like Totti and De Rossi, I’d put them in charge of everything,” said Totti, who said he would still like to attend a Roma game next season with De Rossi, but that the pair would “need wigs, or we won’t see much of the game”.
He added: “Pallotta surrounded himself with the wrong people and he only listens to them. Everyone makes mistakes, but if you make the same mistakes for eight years, you have to ask yourself some questions. Something clearly is going wrong.”