The Super League leaders say they have agreed an undisclosed fee for the 31-year-old, who is set to join Catalans Dragons.
Smith rejoined his home-town club from Wigan two years ago on a four-year contract but lost his place to youngster Danny Richardson towards the end of last season and has made just seven appearances this year, three of them as a makeshift hooker.
"It's been tough for Matty this year," said Saints head coach Justin Holbrook. "He just missed out at the beginning of the season at half-back and it has been hard for him to work his way into the team as we have had a successful season to date.
"He has done a great job for us at hooker when needed but Matty is too good a player not to be playing in Super League regularly and therefore it made sense to make this move happen.
"Matty has been a good influence in training and around the squad and that can't have been easy when he wasn't playing.
"He is a great guy and we wish him all the best."
Smith, who has made 49 appearances in three spells with Saints, said: "Firstly, I would like to thank both Eamonn McManus and Keiron Cunningham for bringing me back to St Helens, a club that I grew up supporting from an early age.
"It's fair to say that the past two years have not gone as I would have hoped or liked.
"Unfortunately, last year the two worst injuries of my career limited my time on the pitch and this season I have not had the chance to play in my most effective position of scrum-half.
"It has been difficult for me to sit and watch because anyone who knows me will tell you how passionate I am about playing rugby league.
"I would like to take this opportunity to thank Eamonn for the way he has handled my situation.
"He has been great with me and allowed me to leave the club two years before my contract was due to end in order to fulfil my desire to play rugby league at the top level.
"I would like to wish everyone at the club nothing but the best for the rest of the season and beyond."
Related rugby league links