A self-adaptive Euler equation solver with moving boundary conditions was developed to simulate the aerodynamic effects induced by a high speed train passing through a tunnel. First, a mesh generation method was developed based on the omni-tree grid structure, and a hybrid mesh generation strategy was established based on a structured grid and a Cartesian grid. Then, a three-dimensional numerical solver was constructed based on the Euler equations, and moving boundary conditions were developed in the numerical solver. Taking the absolute value of the pressure gradient as the control parameter, the grid size can be automatically adjusted under the moving boundary condition. The developed numerical solver was used to simulate a train passing through a tunnel, and the pressure time histories at the probes on the tunnel wall were analysed. In addition, moving model rig experiments were performed under the same conditions, and the numerical results and experimental results were compared. The results agreed well, indicating that both the mesh generation strategy and the numerical solver are highly accurate and could be a good choice for simulating tunnel aerodynamic problems in moving boundary conditions.