On 20 June 2012, it was confirmed by the club that he had left following the expiration of his contract, as they had ended negotiations with the player, and so he became a free agent. Two weeks later, Flamini and Adriano Galliani reached a new agreement for a one-year contract, with the Frenchman taking a significant cut in his wages. On 7 April 2013, Flamini scored his first goal of the season, and Milan's second of the game, in a 2–2 draw against Fiorentina.