The state government said in a statement that the killings took place Saturday night in the village of Huajuapan de Leon.
Three armed men arrived at the house and opened fire. The two children were taken to a local hospital but died hours later.
The statement said police found a small scale that prosecutors presume was used to weigh drugs and three transparent bags containing white powder, believed to be cocaine. Local media reports said a party was being held in the house.