After three seasons at the Nou Camp, where he played 91 games and scored four goals, Mathieu has agreed to join the Portuguese club.
The French defender has had his Barcelona contract terminated. He was one of Luis Enrique's first signings after he became Barcelona manager in 2014.
During his time at Barcelona, he won three Copa del Rey titles, two LaLiga championships, one World Cup, one Champions League and a Spanish Super Cup.
A club statement said: "FC Barcelona wishes the player the best of luck and success in his next professional step."
Mathieu joins Sporting Lisbon on a two-year deal, and will have a 60 million euro release clause.