Based on the acoustoelastic theory, the ultrasonic nondestructive testing method of stress distribution in the thickness direction or bolt axial direction (which is called the Z axis after) is studied. The detection formula was deduced by combining the shear wave and the longitudinal wave, and the stress coefficient is replaced by the acoustoelasticity coefficient to reduce the impacts of the test principle, the uneven thickness and inaccurate stress coefficient. Then the software of ultrasonic testing stress in Z axis direction is compiled by combining interpolation with cross-correlation algorithm, and the detection system is constructed. Tensile tests are conducted with bolts of different specification and length. Error of tensile stress detection, compared with the calculation, is extremely subtle. When the stress increases to over 100MPa, the relative error is less than 5%. The experiment results show that this reliability evaluation method for stress in the direction of thickness is feasible.