The 35-year-old Serbia international joined Rennes from Roma at the start of the season.
Lyon, who are in the relegation places in Ligue 1, said Matic had signed a contract until June 2026.
"Olympique Lyonnais is thrilled to have successfully attracted such a charismatic and experienced player," said the club in a statement.
Matic won league titles with Chelsea and Benfica. He played 13 times this season for Rennes, who are ninth in Ligue 1.