Nanoiron colloid is remarkably suitable for medical, engineering, and other applications because it exhibits excellent properties such as nontoxicity, biocompatibility, and high chemical stability. Because no studies have examined preparation of nanoiron colloid through electric spark discharge method, an electrical discharge machining system for preparing nanoiron colloid was developed in this study based on automated electric spark discharge method with real-time monitoring. An Arduino microcontroller, laser positioning technology, and closed-loop motor control were combined for automatic alignment of the two discharge electrodes. This electrode alignment method enabled achieving electrode alignment accuracy of 0.139 mm. The real-time monitoring applied the Ziegler-Nichols method with a proportional-integral-derivative controller for closed-loop control of the interelectrode gap that, compared with the manually tuned proportional-integral-derivative controller, increased the interelectrode gap discharge success rate from 22.25 to 28.99. A user-friendly interface and process parameters were realized through VisSim software, an Arduino microcontroller, and an RT/DAC4 PCI card. This design enabled obtaining data on process efficiency and providing real-time process diagnosis. Compared with colloids prepared using chemical methods, the nanoiron colloids prepared in this study contained only iron and oxygen; therefore, they would be safer for application in the human body. According to the UV-Vis and Zetasizer analyses, the absorbance peak of the nanoiron colloid prepared with this system ranged from 200 to 220 nm, and the zeta potential was approximately-11.6 mV with a diameter of approximately 155.9 nm. These results verified that this electrical discharge machining system can prepare nanoiron colloid featuring excellent suspension stability.