A mathematical model of the soil pressure system in shield tunneling was proposed to optimize soil pressure control in the soil chamber, based on the constitutive relationship between strain and stress. The desired pressure is determined by using the finite element method. A linear quadratic constant state tracking problem was considered over an infinite time interval. The optimal control law was derived by differentiating the Hamilton function with respect to system input. In order to verify the effectiveness of the proposed mathematical model and optimal control law, an experimental study on the pressure control of the soil chamber in shield tunneling was conducted in a laboratory. The experiment results show that soil pressure in the soil chamber in shield tunneling can be accurately controlled.