The Spanish 14-time Grand Slam champion has played in the Wimbledon warm-up event on six previous occasions, winning the title in 2008.
The 29-year-old said the grass-court tournament offered "perfect conditions" to prepare for Wimbledon, which will start a week later on 27 June.
Last month Andy Murray confirmed he will defend his Queen's title in June.
The 28-year-old, whose wife Kim has given birth to a girl this week, will attempt to win a record fifth title.
The Aegon Championships will be held from 13-18 June in London.
World number five Rafael Nadal will compete at the Aegon Championships at Queen's Club this summer.