Aakash (4) and Sunny (9) were standing near the wall having food when the wall collapsed on them, police said.
"Aakash died on the spot while Sunny was seriously injured," an official said, adding that the boys' family were temporarily residing at a vacant plot next to the factory.
The factory, which had been shut down five years ago, was in dilapidated state.
A case has been registered into the matter.
