The shooting happened around 11:20 p.m. Monday aboard the USS Mahan, a destroyer, base spokeswoman Terri Davis said.
Davis would not describe the circumstances of the shooting but said the scene was secure. No other injuries were reported.
Davis said that the two killed were both males but that she did not have any other information on them. She said she could not say whether the civilian had permission to be aboard the ship. No other injuries were reported.
The base — the largest naval installation in the world — was briefly put on lockdown after the shooting as a precaution, but the lockdown was later lifted. Operations have returned to normal at the base, with counselors available, the Navy said in a news release, but enlisted sailors on the Mahan were not to report to duty Tuesday.
To get on the base, civilians must be escorted or have a pass.
The shooting, which was under investigation, comes just months after a September incident at the Washington Navy Yard, in which a gunman — identified as a contractor and former Navy reservist — killed 12 civilian workers before being shot to death.
The shooting also comes about a month after the Navy held anti-terrorism and force protection exercises around the world, including an active-shooter drill at Naval Station Norfolk.
Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.