Spaniard beaten in four sets by qualifier Brown; Federer, Murray cruise into third round.
Top-seeded Rafael Nadal dismissed Andreas Seppi 6-1, 6-2 to set up a Hamburg Open final against Fabio Fognini and move closer to a record 47th clay-court title.
The fourth-seeded Fognini beat qualifier Lucas Pouille 6-2, 7-6 after saving a set point in the second set.
Nadal is looking to extend his streak of having won at least one European clay court title every year since 2004.
Nadal, a 14-time grand slam champion, has endured a difficult year, surrendering his French Open title, suffering a shock defeat by journeyman Dustin Brown at Wimbledon and dropping to number 10 in the rankings.
He has struggled since being sidelined by injury and illness last year and has only two relatively modest titles to his name in 2015 – Stuttgart and Buenos Aires.
The 2008 champion will be playing his third Hamburg Open final and has improved to 25-6 on clay this season.
Fognini, who won the tournament in 2013, has already beaten Nadal twice this season – in Rio and Barcelona. In doing so, the Italian became the only person apart from Novak Djokovic to beat Nadal multiple times in a single season.
Rafael Nadal beat Andreas Seppi 6-1, 6-2
Fabio Fognini beat Lucas Pouille 6-2, 7-6