PurposeIn response to the challenges posed by the conventional manual flange docking method in the LNG (Liquefied Natural Gas) loading process, such as low positioning accuracy, constraints on production efficiency and safety hazards, this study analyzed the LNG five-axis loading arm’s main functions and structural characteristics.Design/methodology/approachAn automated solution for the joints of the LNG loading arm was designed. The forward kinematic model of the LNG loading arm was established using the Denavit–Hartenberg (D-H) parameter method, and its workspace was analyzed. The Newton–Raphson iteration method was employed to solve the inverse kinematics of the LNG loading arm, facilitating trajectory planning. The relationship between the target position and the joint variables was established to verify the stability of the arm’s motion. Flange center identification was achieved using the Hough transform function. Based on the ROS platform, combined with Gazebo and Rviz, an experimental simulation of automatic docking of the LNG loading arm was conducted.FindingsThe docking errors in the XYZ directions were all less than 0.8 mm, meeting the required docking accuracy. Moreover, the motion performance of the loading arm during docking was smooth and free of abrupt changes, validating its capability to accomplish the automatic docking task.Originality/valueThe proposed trajectory planning and automatic docking scheme can be used for the rapid filling of LNG filling arms and LNG tankers to improve the efficiency of LNG transportation. In guiding the docking, the proposed automatic docking scheme is an accurate and efficient way to improve safety.