Godin, 33, announced in May he would be leaving Atletico after nine seasons with the LaLiga giants.
The Uruguay international's expected move to San Siro was confirmed by Inter on Monday.
"FC Internazionale Milano announces that a contract has been agreed with Diego Godin that will run until 30 June 2022," a statement from Inter read.
Godin became an Atletico great after joining the club from Villarreal in 2010.
He won LaLiga, a Copa del Rey and two Europa Leagues with Atletico, while reaching two Champions League finals.
Godin joins an Inter side looking to rebuild under Antonio Conte, having finished fourth in Serie A last season but 21 points behind champions Juventus.