Mee was a free agent after leaving Burnley at the end of last season when the Clarets dropped down to the championship.
The 32-year-old spent over a decade at Turf Moor, having initially joined on loan from Manchester City in the summer of 2011.
Following the announcement on the club's official website on Friday, Brentford boss Thomas Frank said: "I am very happy that we have signed Ben. He will add a lot of quality and experience to the squad.
"He had six good years for Burnley in the Premier League. I really love his defensive mindset; he knows how to defend the box, he knows how to block a shot and he knows how to win duels.
"He will bring leadership and communication to the team, which is very attractive. He has a very good left foot and will be very good for us on set-pieces in both boxes. I am looking forward to adding him to the squad."
Brentford have already signed Aaron Hickey, Keane Lewis-Potter and goalkeeper Thomas Strakosha ahead of their second season in the Premier League.