Flamini was a former Arsenal player.
The Frenchman put pen to paper on the deal after reaching an agreement with the club following a final round of talks on Wednesday.
The 29-year-old will rejoin the club he left in 2008, having been released by AC Milan earlier this summer, after putting pen to paper on a contract worth £50,000-a-week. The contract includes an option for a third year.
Arsenal will announce the deal after receiving the final clearance from the Premier League.
Flamini becomes the second Frenchman to join Arsenal this summer on a free transfer following Yaya Sanago, who signed after being released by Auxerre.
He was released by AC Milan at the end of last season and has been training with the Gunners for the last three weeks while working on his fitness and looking for a new club.
Arsene Wenger’s top target is Angel Di Maria while he has also not given up hope of signing Wayne Rooney and Yohan Cabaye.
WATCH: Governor Yahaya Bello's Roadmap to Hope 2023