Bio-inspired mapping methods have started a new trend in the robotics navigation area. In this paper, we propose a new map building framework based on the neocortex model: Hierarchical Temporary Memory (HTM). HTM has tree-shaped hierarchical structure and demonstrates structural and algorithmic properties of the human brain neocortex. We first treat the mapping problem as the object recognition problem, and design HTM network hierarchical structure. Secondly, the Speed Up Robust Features (SURF) descriptors were extracted from the grabbed images. These descriptors were further projected into visual words. The presence or absence of visual words consists of input data of HTM in the form of binary sequences. With the binary visual words sequences, HTM network stored or recognized the scene information which were reflected in the visual words, and the output of HTM was the related environment map. After training the HTM network, we evaluated it by two sets of environment data. The results show that the HTM based mapping strategy can build the environment map successfully and handle the loop closing problem with high performance.