In robot-assisted endoscopic nasal surgery, due to the slender and complicated nasal cavity and sinus anatomical structure, the nasal endoscope of robot end-effector is prone to injure surrounding tissues during surgical approaches. In order to improve the movement safety of the endoscope in robot-assisted endoscopic nasal surgery, a path planning method for endoscopic surgical approaches based on medical image pixel map searching is proposed in this paper, and safe surgical paths from the nasal entrance point to the operating areas are obtained. Firstly, through the trajectory analysis of nasal endoscope tip during surgery, the path planning requirements of endoscope tip are analyzed and obtained. Then, considering the slender and complicated anatomy of the nasal cavity, a binarized three-dimensional grid map containing the spatial anatomy of the nasal cavity is constructed based on the patient's CT medical image sequence. The endoscopic surgical approaches are searched and optimized by introducing the A-star algorithm, and safe surgical paths from the nasal entrance point to the operating areas are obtained. Finally, a virtual nasal endoscopy system is developed and tested on a head model containing nasal tissue, and the effectiveness of the planned surgical paths is verified by automatic virtual nasal endoscopy browsing experiment.