The Uruguay international joined the Saints in a £12million move from Bologna in 2012 but failed to live up to expectations at St Mary's.
Ramirez joined the Boro in a loan move from the Saints back in January and helped the club achieve promotion to Premier League by scoring seven goals, before the 25-year-old made his way back to the Riverside Stadium in a permanent deal this summer.
"I always wanted to come back here," said Ramirez.
"When you feel comfortable somewhere and the people and the gaffer want you, it makes it really easy to make a decision."
"When I joined Southampton, I thought I did well but then for one reason or another I fell out of the team and didn't really play again after that.
"I needed to find another place to play football and thankfully that has turned out to be Middlesbrough.
"The coach has given me lots of confidence and hopefully, I can play well at this level. I have done it in the past so I know what I am capable of."