The Croatia international, 30, struggled to break into the Bayern first team last season and was widely expected to move this summer after agreeing to terminate his contract.
The deal was announced by Sporting on their website, although Bayern did not release an official statement.
A versatile midfielder who spent much of his three-year Bayern spell as a left-back, Pranjic has 45 caps for Croatia but was on the fringes of the team at the European Championships after losing his first-team place in Germany.
He previously played for Heerenveen in the Netherlands and has played for Osijek and Dinamo Zagreb in his homeland.
Pranjic had been linked with Everton and Fulham.