Three-dimensional wafer stage is an important component of lithography. It is required to high positioning precision and efficiency. The closed-loop positioning control system, that consists of five-phase step motor and grating scale, implements rapid and precision positioning control of the three-dimensional wafer stage. The MCU STC15W4K32S4, which is possession of six independent PWM output channels and the pulse width, period is adjustable, is used to control the three axes. The stepper motor driver and grating scale are subdivided according to the precision of lithography, and grating scale data is transmitted to the computer for display in real time via USB communication. According to the lithography material, mask parameter, incident light intensity, it's able to calculate the speed of Z axis, and then get the value of PWM period based on the mathematical formula of speed and pulse period, finally realize high precision control. Experiments show that the positioning control system of three-dimensional wafer stage can meet the requirement of lithography, the closed-loop system is high stability and precision, strong practicability.