The Scottish Government confirmed the probe into building flaws at the new Royal Hospital for Children and Young People (RHCYP) and the Queen Elizabeth University Hospital (QEUH) sites.
The move follows recent concerns from affected parents over safety and well being.
The inquiry will determine how problems relating to ventilation and other key building systems occurred, and what steps can be taken to prevent this being repeated in future projects.
Bid document problems have caused delays at the RHCYP while the QEUH is at the centre of an investigation into the deaths of two cancer patients who contracted infections from a fungus found in bird droppings.
Health Secretary Jeane Freeman said: “The safety and well-being of all patients and their families is my top priority and should be the primary consideration in all NHS construction projects.
“I want to make sure this is the case for all future projects, which is why, following calls from affected parents, I am announcing a public inquiry to examine the new Royal Hospital for Children and Young People and the Queen Elizabeth University Hospital sites.
“The recent KPMG and NSS reports into the new Edinburgh Children’s Hospital will provide a significant amount of the underpinning evidence for the inquiry alongside the ongoing independent review into the delivery and maintenance of the QEUH.
“The current situation is not one anyone would choose – but it is one I am determined to resolve.”
The design and build of both hospitals was carried out by Multiplex.