To solve the problem of easily falling into the local dead zone when the robot avoids obstacles with VFH algorithm, a method is proposed to add memory maps for robots. When facing the unknown environment, the improved strategy of using adaptive threshold is used to avoid the local dead zone and reach the target point, meanwhile, a memory map is generated on which a low resolution A* guided domain is then produced and the cost function is improved to effectively combine the A* guided domain with the VFH algorithm to complete obstacle avoidance with a better path and adapt to changes in the surrounding environment in real time. Finally, the algorithm is verified in different environments. The experimental results show that the strategy of using adaptive threshold can complete obstacle avoidance and generate memory map in unknown environment; based on memory map and the guidance of the A* domain, the robot can adapt to the changes of the surrounding environment and smoothly reach the target.