Flekken, 29, joins on a four-year contract from Freiburg after keeping 13 clean sheets in 34 Bundesliga matches this season.
Bees head coach Thomas Frank said: “We’re very happy to have signed Mark.
“He’s a player with a lot of quality who will strengthen our goalkeeper group. He has big experience and joins us after two great seasons with Freiburg, who have just had a top season in the Bundesliga, finishing fifth and qualifying for the Europa League.
“He was a big part of the team there and now he’s coming to us and will hopefully make the group better and the team better. He’s a very good shot-stopper and comfortable with the ball at his feet. His distribution is very impressive.”
Brentford goalkeeper coach Manu Sotelo added: “Mark has been performing at a high level in the Bundesliga, being one of the best keepers there.
“He will fit very well with our style of play. His strengths on the pitch are his quality on the ball, his agility as a shot-stopper, and his space awareness as a sweeper keeper and in defending crosses.
“His personality and leadership qualities are perfect for our culture. We are delighted to have him with us.”