The invention provides an electromagnetic valve driving device capable of carrying out online regulation, which comprises an MCU (Micro Controller Unit), a first D/A (Digital-Analog) conversion circuit, a second D/A conversion circuit, a third D/A conversion circuit, a first amplifying circuit, a first comparator, a second comparator, a third comparator, a CPLD (Complex Programmable Logic Device) logic control circuit, a boost controller enabling circuit, a boost controller, a booster circuit, a high voltage driving circuit, a low voltage driving circuit, a cylinder selection driving circuit, a high voltage driving pipe, a low voltage driving pipe, a cylinder selection pipe and a sampling resistance R. Parameters of the first D/A conversion circuit, the second D/A conversion circuit and the third D/A conversion circuit and logic in the CPLD are subjected to online setting by the MCU. According to the invention, online adjustability of a driving high voltage and a driving current of an electromagnetic valve can be implemented. The electromagnetic valve driving device is used for driving the electromagnetic valve in an electric control common rail oil sprayer of a diesel engine.