An advanced sonar morphology-based posterior approach (SMP) to building an occupancy grid map for a mobile robot is proposed in this study. It is very important for a mobile robot to find its surrounding saliencies and to localize itself for indoor navigation. Ultrasonic sensors are of great practical value in building environmental maps and for autonomous operation. However, grid maps constructed by ultrasonic sensors cannot typically form a realistic representation of a given environment due to incorrect sonar measurements caused by specular reflection and wide beam width. The sonar sensor model proposed in this study, in which the negative effect of incorrect sonar measurements is minimized by geometric association with sonar footprints, is adopted to build a high-quality grid map. Experimental results and evaluations in home and corridor environments demonstrate the validity of the proposed methods.