The clash, allegedly triggered by quarrels between guests over a young "dancing boy", erupted late yesterday in Deh Salah district in the once-tranquil province of Baghlan.
The province has recently been plagued by growing insecurity as the Taliban insurgency rapidly spreads north from its southern and eastern strongholds.
"As a result of the clashes, 22 people were killed and 10 others were wounded," provincial police spokesman Jawed Basharat told AFP, adding that the incident appeared to be the result of a local feud.
"A local security official fired in the air after the verbal exchange heated up... And then both sides started trading fire," district police chief Gulistan Qusani told AFP.
Also Read
Baghlan governor Sultan Mohammad Ebadi said officials were looking into allegations that the feud was over a "dancing boy" who had been brought to the wedding party for "entertainment" - and was eventually killed in the firefight.
Qusani said an official delegation had been sent to the site - a Tajik-dominated area that is largely unaffected by the Taliban insurgency - to investigate and prevent any backlash from the relatives of the victims.
Expensive and lavish weddings have become common since the Taliban were toppled in 2001, in contrast to their time in power when musical revelry and dancing were banned.
The killings also highlight the lure of the gun culture in Afghanistan, especially across the insecurity-plagued countryside where owning firearms for personal safety is common among Afghan households.