The accused had been celebrating at the Norwood legion with his family, provincial police in eastern Ontario said.
The friend noticed the accused drinking and took the keys to his pickup to prevent him from driving home, police said.
But police said that move irked the accused who at about 10 p.m. began demanding his keys back.
He became angry and grabbed what appeared to be a shotgun, which was later identified as a BB gun, and confronted his friend in a threatening manner, police said.
The friend ran to his nearby home, locked the doors and called 911.
Jeffrey Colazzi, of Norwood, has been charged with intimidation and using an imitation firearm in the commission of an offence.