Ranieri made the decision after Roma recorded their fourth consecutive defeat on Sunday, against Genoa.
“I’ve always thought about the good of Roma and after a game such as today’s I believe it’s right to give a signal,” he said.
“After the final whistle I went into the changing rooms to thank the team and I decided to hand in my resignation.
“Today we began with the desire to fight for the victory for all those who love this shirt and this city.
“Every minute of my day is dedicated to Roma and I’ve always said that for me a defeat is especially painful.
“But seeing my lads fighting to the end and losing shook me to the core.
“I want to thank all the fans and the president [Rosella] Sensi. Together, despite the difficulties, we did a great job last year and this year.
“I am and always will be a man of the pitch and after a game such as today’s I believe it’s right to give a signal for the love of these colours and I hope that my decision will help spur on the team.
“Sport and football have values that for me and for those work hard and with passion are life itself.”