The world number one was beaten in four sets by the German in Melbourne.
Roger Federer is through to the last eight after he beat Kei Nishikori 6-7, 6-4, 6-1, 4-6, 6-3.
In the women's singles, Venus Williams swept aside Germany's Mona Barthel to reach the quarter-finals for the seventh time.
The 36-year-old seven-time Grand Slam champion won 6-3 7-5.