The Chile international, 31, joined the Serie A side on a season-long loan in August 2019.
He scored four goals in 29 appearances in all competitions.
Inter expect to have him available for the Europa League ‘final eight’ in Germany after beating Getafe on Wednesday night.
“We have agreed [the deal],” United boss Ole Gunnar Solskjaer told BT Sport after his side also reached the quarter-finals with a win over LASK.
“He has enjoyed his time there. He is a top player but for whatever reason, we didn’t see the best of him. He is a top professional and we wish him all the best.”
The precise terms of the deal are unknown but is almost certain to have involved United taking a significant financial hit.
Sanchez played 45 games for United after joining from Arsenal in 2018, scoring just five goals.
The deal will bring to an end one of the most controversial and ill-fated transfers in United’s history.
They fought off competition from Manchester City for Sanchez, signing him from Arsenal on a four-and-a-half-year deal on an eye-watering £400,000-a-week.
But Sanchez completely failed to recapture the form he showed so often during his time with the Gunners.