The 34-year-old will join the Champions when his contract at Sampdoria expires on 30th June.
Castellazzi is set to sign a two-year contract with Inter Milan, according to his agent.
“I met Marco Branca (Inter’s sporting director) and we have arranged all the details,” Adriano Rebuffi told fcinternews.it.
“The contract is for two years, with Inter having the option to take up a third year.
“We are very happy as this is what we wanted. Luca is currently away on vacation, but he has been informed of everything.”