Hydrogen energy is a kind of clean secondary energy sources. Mixed hydrogen natural gas transportation technology is a new scheme of hydrogen transportation. Using natural gas pipe to transport hydrogen is expected to further promote its application. In order to study the mechanical properties of buried steel pipe under seismic waves, a numerical model is established. The time history and stress distribution of pipe section under seismic wave are analyzed. Effects of seismic intensity, surrounding soil, buried depth and seismic wave type on pipe's mechanical properties are discussed. The results show that the pipe section stress fluctuates under seismic wave, and the stress shifting effect occurs. The maximum stress is located in the directions of 45 deg, 135 deg, 225 deg, and 315 deg. Stress increases with the increasing of seismic intensity, and the stress distribution of pipe section is also changed. Stress responses of the pipe in different soil are different, and the stress distribution of pipe section at the maximum stress time is similar. The deeper the buried depth is, the greater the pipe stress is. Pipe stress is related to the maximum acceleration of the seismic wave and spectrum characteristics. Those results can provide a basis for the design and safety evaluation of mixed hydrogen natural gas pipes.