David Armstrong, 32, entered the plea to the lesser charge of involuntary manslaughter and admitted using a gun to fatally shoot Brian Kaplon, 32, according to Deputy District Attorney Jeffrey Stodel.
The judge is expected to dismiss the initial charge of murder when Armstrong returns for sentencing on Nov. 30. He faces up to 14 years in state prison.
The shooting occurred near midnight on March 18, when Kaplon went to Armstrong's home to celebrate St. Patrick's Day. While the two men were in the garage, Armstrong pulled out his new AR-15 semiautomatic rifle and shot Kaplon.
Armstrong said he was showing Kaplon the gun when it accidentally went off, striking him in the chest.
Stodel said that Armstrong, who had been drinking heavily, gave conflicting recollections of what happened.