The royal visit on 7 June will include a look at Europe's most powerful brain scanner, of which there is only one other in the world at Harvard University in the United States.
It will allow scientists to look at how brains work in minute detail.
The Maindy Park building, finished a year ago, will bring together four hi-tech scanners under one roof.
The centre will concentrate on research to hopefully understand more about the causes of conditions like dementia, multiple sclerosis and schizophrenia.
The Connectom scanner is six times more powerful than a conventional hospital MRI scanner and has been described as the "Hubble space telescope of neuroscience".
It will allow researchers to study brain cells only 1000th of a millimetre across.
Using a conventional scanner has been described as looking at a galaxy through a telescope and seeing a blur.
Vice-Chancellor Prof Colin Riordan said the university was "honoured" to welcome The Queen and Duke of Edinburgh to open the centre.
"This will be a fitting occasion for a facility that is not only significant for the university but for Wales, the UK and Europe," he said.
"The research here has the potential to unlock some of the secrets of the brain and significantly contribute towards treatments for neurological and psychiatric conditions."
Prof Derek Jones, centre director, said: "This is the culmination of a huge amount of hard work by many people over several years and I would like to thank everyone who played their part in creating this remarkable facility.
"The combination of the very best staff in their field and some of the most powerful scanners in the world has the potential for breakthroughs that could make a real difference to people's lives around the world."
The royal couple will be invited to view brain imaging procedures and pupils from a local school will take part in activities to illustrate the power of the brain.
A specially-commissioned sculpture created by PhD student Gemma Williams from the University's School of Psychology will also be unveiled.
Cubric will be four times larger than the university's existing brain research imaging facilities.

Addicks supporters have staged a series of protests aimed at the Belgian businessman in recent months, prompting a statement claiming some fans "want the club to fail".
"Whether you like protests or not, the fans feel they need to be heard," Powell told BBC Radio London.
"They want answers and, quite clearly, they are not getting them."
Some Charlton fans have formed a campaigning group called CARD (Coalition Against Roland Duchatelet) which is calling for the the Belgian to sell the club.
Several protests took place at their last home match against Middlesbrough including a mock funeral, beach balls being thrown onto the pitch to halt the game and a walk-out by supporters in the second half.
Last month Duchatelet, who has a network of clubs around Europe, told the South London Press he has "empathy" for the fans, but was not prepared to sell.
Powell had three stints as a player at The Valley and was manager when Duchatelet took over the club in January 2014 - only to be dismissed in March that year.
"They made the statement last week which I don't think any supporter could understand," Powell, 46, added.
"It quite clearly shows there is no synergy between the owners, the higher management and the fans.
"I don't know what will happen. I'm sure many thousands of Charlton fans would like that question to be answered.
"The only person who can answer that question in Roland Duchatelet - but he hasn't. I think it is right for him to say 'This is my plan for your football club.'"
The Queen is to open the new £44m Cardiff University Brain Research Imaging Centre (Cubric) next month.
[NEXT_CONCEPT]
Former Charlton boss Chris Powell says fans deserve to know what owner Roland Duchatelet has planned for the club.