I read this in the late 90's if I recall correctly. Can't remember title or author.
American astronaut is doing a survey of back side of the Moon. He is shot down and captured by the AI that controls an immense spaceship hidden inside the Moon.
In fact: the Moon is the spaceship, the outer layer (100 KM or so) of rock is just camouflage.
He becomes the new captain of the ship that was left empty after the crew was forced to leave the vessel in the aftermath of a mutiny.
That mutiny was 10.000 years ago. The original crew (mutineers and loyalists) took refuge on Earth and have been fighting ever since. Both factions have hooks into Earth governments and their ongoing battles are mostly of the black-ops/espionage type.
The new captain makes contact with the loyalists and eventually defeats the mutineers.
Some other details: Cyborg tech that enhances the crew: Stronger, faster, better reflexes, better health, longer live and direct mind-machine communication-interfaces.
The ship was originally stationed in Earth-orbit as a hidden outpost of a big space-empire. There is an alien race that sends a destruction-fleet every xxx thousand years through this arm of the Milky Way to wipe out any intelligent life. The ship is on guard-duty against that threat. The ship AI is getting very nervous as he has no crew and the alien invasion is about due.
I'm pretty certain it was the first novel in a multi-part series, but I never read the others and I would like to.