This paper presents a data-driven method for waveform optimization of a two-axis smooth impact drive mechanism (SIDM) actuator. The actuator was constructed by two piezoelectric elements (PZTs) perpendicularly fixed to an L-shaped base for two-axis positioning. An XY stage was designed and constructed by assembling the two-axis SIDM actuator. The XY stage could position long motion ranges of several millimeters with nanometer-level resolution, and the size was confined to be 20 mm (X) × 20 mm (Y) × 4.5 mm (H). The data-driven method based on the long short-term memory (LSTM) neural networks was used to predict the optimum input voltage waveform of the actuator. With the optimized input voltage waveform, it was verified that the maximum velocity of the stage could be improved about two times.