With the continuous development of the 3D LiDAR (Light Detection And Ranging) mapping algorithm and its application in various fields, the size of the point cloud map becomes a bottleneck that limits the 3D LiDAR mapping algorithm from running for a long time. In this paper, a 3D LiDAR mapping method based on scan-to-map and variable resolution NDT (normal-distributions transform) registration is proposed. When updating the global map, variable resolution processing can reduce the size of the global map and improve the accuracy of map construction. In addition, the size of the map created by the mapping algorithm is proportional to the size of the space and does not grow infinitely over time. The mapping experiments using a rotating LiDAR in the room, corridor, and outdoor environments show that the algorithm has higher mapping accuracy and smaller map size than without considering the variable resolution strategy. The experimental results of the map construction for a long time in an appropriate test area illustrate that the map built by the algorithm does not grow infinitely with time in the fixed space. In summary, by adjusting the map resolution adaptively according to the curvature of different areas in the 3D LiDAR mapping process, the proposed variable resolution strategy can maintain the size of the global map almost proportional to the size of the space. Moreover, the mapping accuracy can be improved as well.