On Sunday, Roger Federer lost to Rafael Nadal in the French Open.
On Monday, Federer withdrew from the upcoming Gerry Weber Open that is scheduled to begin on June 20.
Federer has won the tournament five times. His opening-round match was set against Australia's Lleyton Hewitt.
Federer added of his decision to withdraw from the event in Germany: "I am very disappointed as it's one of my absolute favourite tournaments on the ATP Tour, but my body, especially my groin, really needs a rest."
Federer also said he believes playing in the tournament would have put him at risk to not be healthy for Wimbledon. The grass court Grand Slam tournament is Federer's tournament. He has won the most titles for a Slam tournament at the All-England Club with six.
Even the Gerry Weber Open tournament organizer was shocked by the Fed's decision.
"I am stunned," said tournament director Ralf Weber said. "Our plans for the past year have been nearly exclusively with Roger appearing.
"He never gave us any doubts that he had health problems. I clearly expressed my disappointment to his management."