The 31-year-old winger began his career at the Portuguese club before leaving for Manchester United in 2007.
Nani previously returned to Sporting for a loan spell during the 2014-15 season, netting 11 goals in 36 competitive appearances.
The Portugal international spent last season on loan in Italy with Lazio, where he only managed 18 appearances in Serie A.
Nani, who won Euro 2016 with his nation two years ago, was contracted to Valencia until 2019.
— Sporting Clube de Portugal (@Sporting_CP) July 11, 2018