Sha Ka Ree entity

Being imprisoned at the galaxy's center

A powerful being trapped on a planet at the center of the galaxy who posed as God to win a starship for its escape.

The entity lived on a planet beyond the Great Barrier at the center of the galaxy, a place Sybok believed was the legendary Sha Ka Ree. It took on the appearance of a godlike figure and wielded great destructive power, but was imprisoned and could not leave the world on its own.
In Star Trek V: The Final Frontier, Sybok took the Enterprise to the planet to meet it. When Kirk questioned why a god would need a starship, it attacked. Sybok sacrificed himself to hold it back, and a Klingon Bird-of-Prey, with Spock at its weapons, destroyed the entity.