Environment map construction is one of the key research directions of autonomous driving technology. Autonomous vehicle driving in unknown environments need to detect obstacles and identify passable areas. Traditional methods usually use two-dimensional planar maps without vertical information, and cannot exclude the influence of dynamic obstacles. In order to reflect the unknown environment information more accurately, this paper proposes a 3D map construction method based on Apollo autonomous driving system. Firstly, the point cloud data and pose data were obtained by the sensors mounted on the vehicle. Secondly, the 3D environment space was divided into different grids by the occupancy grid map algorithm. Then, the coordinates of different state grids are updated by ray casting algorithm. Finally, the Point Pillar algorithm is used to identify the dynamic obstacles and eliminate the residual shadows to obtain a more accurate 3D map. The experimental results show that the proposed method can effectively construct the unknown environment map, accurately reflect the three-dimensional information in the environment, and avoid the influence of dynamic obstacles.