The 31-year-old was forced to withdraw from both the 2016 and 2017 editions of the week-long competition due to injury but aims to return this summer, 10 years on from his one and only Queen's victory.
"I am very excited to communicate that I am going to come to Queen's in 2018, it is going to be the 10th anniversary of my victory in 2008," the world number one said in a statement.
"It's a great memory, winning there and three weeks later winning Wimbledon. It was an unforgettable year. I am very excited to be coming back and playing Queen's again."
Tournament director Stephen Farrow added: "We are delighted that Rafa is planning to return to the Queen's Club.
"His run 10 years ago will never be forgotten and to see him back at the top of the world rankings a decade later is a testament to his greatness and desire to achieve even more."
The tournament will run June 18-24.