The shooting took place shortly before midnight in the town of Campinas, about 100 kilometers (62 miles) north of Sao Paulo, according to news reports that cited local police.
The 12 shooting victims, all members of the same family, had gathered to ring in the new year.
Reports said the estranged couple had recently separated. The dead included their eight-year-old son.