The invention provides a solar road marking vehicle with an automatic alignment function. The solar road marking vehicle comprises a power supply device, a material storage device, a walking device, amarking device and an electric control device. The power supply device comprises a solar cell panel, a solar cell panel steering table and an energy accumulator; the storage device comprises a paintstorage tank, a paint level sensor, a pressure sensor, a stirrer, a non-polar floating ball, a floating rod, a floating rod handle, a paint storage tank cover and an alarm switch; the walking device comprises propelling wheels, a propelling wheel motor, a steering wheel, a steering wheel steering engine, a steering wheel and an infrared sensor; the marking device comprises a cleaning rolling brush, a rolling brush motor, a paint spraying pump, a paint spraying pipeline, a paint spraying nozzle and a marking instrument; the electric control device comprises an ultrasonic range finder, a single-chip microcomputer, a motor driving module, a PWM speed regulation module, a control panel and an alarm. The distance between the marking vehicle and the road edge stone is accurately measured throughthe ultrasonic range finder, during work, under the control of the electric control device, the steering wheel steering engine makes a position adjustment response, the marking vehicle achieves the automatic alignment scribing function, and the problem that manual scribing errors are large is effectively solved; the solar power supply device is installed, two solar cell panels are arranged, and the marking vehicle is dragged by electric power so that energy consumption is effectively reduced, and the problem of trembling of scribing equipment of an internal combustion engine is effectively solved. The vehicle overcomes the defects of high labor intensity, high technical requirements and low scribing precision of the traditional manual scribing, and has the technical advantages of simple structure, convenience in operation, high system efficiency, safety, reliability, high precision and low energy consumption and popularization value.