Pastore moved to the Italian capital from Paris Saint Germain in the summer of 2018 for €24.7m but his time at the club was blighted by fitness problems.
The 32-year-old only made 37 appearances in all competitions during his three years with Roma and scored three goals.
Pastore made just five appearances in Serie A last season for Roma, who have now decided to cut their losses on the former Palermo playmaker.
"It is not easy for me to leave this club, the city and these fans with the awareness of not being able to meet the expectations that they had for me,” Pastore posted on Instagram after his exit was confirmed.
"Anyone who knows me knows how much I have suffered and with what commitment I have worked to try to overturn my destiny.
"Ours was not a lucky story, but in leaving I also feel that I have kept intact a feeling of respect and gratitude towards this city and towards the people who three years ago welcomed me with love and enthusiasm.
"I hope you will soon be able to celebrate great successes: Roma, Roma and their fans deserve them."
Roma have started this season brightly under Jose Mourinho, recording two wins in their opening two Serie A matches.