Police identified the man as 40-year-old Timothy John Walker.
At 7:09 p.m., Vallejo police received a report of a loud verbal and physical altercation inside a boat in the marina at 42 Harbor Way, police said.
A police officer arrived at the marina to investigate the reported fight at about 8:06 p.m.
The officer located a man, later identified as Walker, on a large live-aboard boat, police said.
According to police, Walker pointed a weapon at the officer. Acting in self-defense, the officer drew his gun and fired at the suspect.
Walker was transported by ambulance to Kaiser Hospital in Vallejo, where he died of his injuries, police said.
The weapon Walker was carrying was a flare gun modified to be a handheld shotgun, according to police. It was painted black and the gun's breech was reinforced.
After searching the boat, police found shotgun ammunition and a .22 caliber bolt-action rifle equipped with a silencer, police said.
The Vallejo police officer was not injured during the incident and has been placed on administrative leave in accordance with department procedure.
The shooting is being investigated by the Solano County District Attorney's Office and the Vallejo Police Department.