Cruz Perez, 22, and Steven Figueroa, 18, are accused of felony aggravated battery with a firearm in the Monday night shooting.
The boy was shot in the leg while he was in costume and trick-or-treating near Albany Park on Chicago's North Side.
Perez and Figueroa were positively identified in police lineups and charged early Wednesday. Both suspects are Chicago residents.
According to Chicago police, Perez also faces an additional charge for a parole violation warrant.
Both men were scheduled to appear in bond court later Wednesday.