"An active shooter has just been reported in building #26 at Naval Medical Center San Diego. All occupants are advised to run, hide or fight," the facility posted on its official Facebook page.
The nearby Naval Base San Diego also posted information online about a possible shooting.
"If in immediate danger, hide or seek shelter in secure space," the base wrote on Facebook.
"Barricade the door and dial 911. Silence phones and other devices." Local news station CBS 8 reported that police had confirmed shots were fired outside Building 26 on the hospital's third floor.
San Diego, the southernmost city on the California coast, has a sprawling military infrastructure and is a major port for the US Navy.
The hospital is located in Balboa Park, close to San Diego's famous zoo.