The current mature Simultaneous Localisation And Mapping (SLAM) algorithms, when applied to tunnel scenarios with point cloud degradation and poor lighting conditions, often lead to a sharp increase in the estimated attitude error of the unmanned aerial vehicle (UAV), or even prevent the UAV from moving autonomously due to severe feature degradation. To address the above problems, the authors propose a SLAM algorithm based on factor graph optimisation, Iterative Closest Point and Normal Distributions Transform algorithms. A front‐end point cloud registration module and a back‐end construction algorithm based on filtering and graph optimisation are designed. To verify the effectiveness of the proposed algorithm, experiments are conducted on KITTI dataset and real tunnel scenes, and compared with LiDAR Odometry and Mapping (LOAM) and lightweight and ground optimised (LeGO)‐LOAM algorithms. The results show that the average processing time of the proposed method is about 75 ms, which can meet the real‐time requirements of autonomous aerial vehicles. Compared with LOAM and LeGO‐LOAM in the real tunnel experiment, the proposed method shows the tunnel 3D map construction.