Disclosed herein are a method and system for updating an occupancy map based on a super ray. The method of updating an occupancy map based on grids and octrees includes the step of generating a mapping line based on point clouds obtained from a sensor, generating a super ray by identifying a cell belonging to a plurality of cells forming the occupancy map and traversing an identical cell based on the generated mapping line, and updating the occupancy map by updating a cell through which the super ray corresponding to some of rays related to the plurality of cells forming the occupancy map passes.