The ocean is believed to hold more water than is found on Earth's surface, which broadens the hunt for places in the solar system where life might be able to exist, the US space agency said.
Ganymede, the largest moon in the entire solar system, is larger than the planet Mercury.
The Galileo spacecraft, which arrived at Jupiter in 1995, has already detected a possible magnetic field on Ganymede.
These "ribbons of glowing, hot electrified gas" can be seen in regions around the north and south poles of the moon, NASA said in a statement.
Also Read
Because aurorae are controlled by a moon or a planet's magnetic field, observing changes in the aurorae can lead to better understanding of what exists inside.
Researchers found that Jupiter's own magnetic field interacts with Ganymede's, causing a rocking motion in the aurorae that is reduced by magnetic friction from the presence of Ganymede's underground ocean.
"We do not have these ambiguities anymore," he told reporters.
The latest findings from Hubble "provide the best evidence to date for the existence of an ocean on Ganymede."
Heidi Hammel, executive vice president of the Association of Universities for Research in Astronomy, said the approach showed that a space telescope could be "a powerful tool" to make inferences about the interior of a moon.
Already, scientists know there are oceans beneath surfaces of Jupiter's moon Europa and Saturn's moon Enceladus. Jupiter's moon Callisto is believed to have subterranean water as well.
Now, much more can be learned about the conditions on Ganymede when a European Space Agency mission, called Jupiter's Icy Moons Explorer (JUICE) launches in 2022 and arrives at Jupiter in 2030, she added.