Federer is a five-time champion at the Wimbledon warmup tournament and was the No. 1 seed.
"I am very disappointed as it's one of my absolute favorite tournaments on the ATP Tour, but my body, especially my groin, really needs a rest," Federer said on his website Monday — a day after losing to Rafael Nadal in the French Open final. "After talking with my team this morning, I feel that it's way too risky to take a chance on aggravating it even more before Wimbledon."
Federer lost to Lleyton Hewitt in the 2010 Halle final and was due to play the Australian in the first round. His departure leaves Tomas Berdych of the Czech Republic as the highest-seeded player left in the draw at No. 2.
Tournament director Ralf Weber said Federer's withdrawal was "a personal disappointment that I cannot describe at the moment."
"I am stunned," Weber said. "Our plans for the past year have been nearly exclusively with Roger appearing. And he never gave us any doubts that he had health problems. I clearly expressed my disappointment to his management."