Flamini rejoins Arsenal after Milan exit
Flamini moved to San Siro in 2008 after a four-year stint at the Emirates Stadium that saw him make 153 appearances.
The France international won a Serie A title and the Supercoppa Italiana while with Milan and left following the expiry of his contract.
Manager Arsene Wenger was pleased to secure the versatile 29-year-old's services.
"We're very pleased Mathieu has agreed to rejoin us," the Frenchman told the club's official website.
"He is a player of real quality, with a fantastic work rate and great mentality. As we know, Mathieu is a strong midfielder, but is also is comfortable playing in defence too. He is a very good addition to our squad."
Flamini, who featured 22 times for Milan during the last campaign, had been training with Arsenal over the close-season.
Wenger has now made two signings since last season, having also added 20-year-old forward Yaya Sanogo from Auxerre.