The Spain international has endured a troubled career at Stamford Bridge, struggling for form following his then-British record-breaking 63 million euro move from Liverpool, but will now stay with the Rossoneri until 2016.
MORE: Alex Morgan upset at 159-degree temps | Transfer photos
Goal reported the San Siro outfit's interest earlier this week, though there had been fears that the deal could collapse over the 30-year-old's €214,000-a-week wages, but the two sides have worked hard to reach an agreement.
Milan, meanwhile, had been looking for a new No. 9 following the sale of Mario Balotelli to Liverpool earlier this week.