The accident happened in Qinwangling Village of China's Shanxi Province.
While two people were killed on the scene, three others were injured, official Xinhua news agency reported.
All the three injured persons died in a hospital later.
The waste residue belongs to Tianma Energy Company, whose major businesses includes iron and coke production and casting.