The Belgian midfielder, who played for Cagliari for four years before joining Roma in 2014, has put pen to paper on a one-year loan deal.
Nainggolan, a €38million signing from Roma in June 2018, was restricted to 22 league starts in an injury-plagued 2018-19 and failed to make much of an impact.
Inter chief executive Giuseppe Marotta informed the 31-year-old last month he and Mauro Icardi were free to find new clubs, with head coach Antonio Conte deeming him surplus to requirements.
A number of teams reportedly showed an interest in Nainggolan, most notably Fiorentina, but Cagliari have agreed a deal to sign him.
Nainggolan's return to the Sardegna Arena comes three weeks on from Inter signing midfielder Nicolo Barella from Cagliari on loan with an obligation to buy for a reported €50m.