Hydrogen storage cylinders are often used for medium- and short-distance transportation of hydrogen. The presence of hydrogen tends to increase the risk of using the gas cylinders. The alternating stress caused by factors such as hydrogen charging and discharging during the service process of the gas cylinder leads to the expansion of initial cracks inside the cylinder and the final fatigue fracture. At present, the fatigue life calculation of pressure vessels mainly adopts the S-N curve method, however, some steels do not have the S-N curve under the hydrogen environment, it is necessary to use fracture mechanics methods to analyze the fatigue life of gas cylinders in a high-pressure gaseous hydrogen environment. In this work, a method for calculating the fatigue life of fracture mechanics for hydrogen storage cylinders was established according to ASME VIII-3 KD-10. The development of the program was completed by Matlab. An example was given to illustrate the program. Firstly, basic parameters of the material used for the cylinder were obtained. Then, finite element method was used for stress analysis to obtain the fitting curve and the function expression of hoop stress. Finally, fatigue life calculations of high pressure hydrogen storage cylinder were made. The minimum service life of example was predicted to be 40 years. This result is consistent with the good service history of this type of container. This work could contribute to design, safety evaluation of hydrogen storage cylinders.