Silva was the subject of a £37.5 million offer from Paris Saint-Germain earlier in the summer, a fee that would have made him the most expensive defender in history.
However, Milan rejected the approach for the Brazil international and have now moved to secure his future by agreeing an improved contract.
Silva was previously under contract with Milan until June 2016 and had an annual salary of £3.25 million.
His new contract will see him earn a reported £4.8m per year with Milan.
The 27-year-old joined Milan from Fluminense in January 2009 and has become one of Europe's most respected defenders during his time at San Siro.