Retail sales rose by 0.6% in real terms compared to the previous month, the Federal Statistical Office reported.
Analysts had predicted a 0.5% increase in a Reuters poll.
Despite the overall rise, food retail sales fell in May on the previous month by 0.6% amid significantly higher prices for groceries, the office said.
That was nonetheless a recovery after grocery retailers saw a sales decline of 7.7% in April, the biggest month-on-month drop since the time series began in 1994.
In May, the non-food retail sector recorded real sales growth of 2.9% compared with April, according to the data.
Sales in textiles, clothing, footwear and leather goods were particularly strong, growing by 10.6% month on month and 59.8% year on year.
Preliminary data released on Wednesday showed inflation unexpectedly cooling off in June in Europe's largest economy, falling to 8.2% compared with 8.7% in May.
"The inflation scare continues to chill consumers' bones," said Alexander Krueger, chief economist at private bank Hauck Aufhaeuser Lampe.
"At present, it is not apparent where a turnaround in sentiment will come from," Krueger commented.