This paper presents an improved method for compensating ultra-tiny electromagnetic tracker (UEMT) outputs and its application to a flexible neuroendoscopic surgery navigation system. Recently, UEMT is widely used in a surgical navigation system using a flexible endoscope to obtain the position and the orientation of an endoscopic camera.However, due to the distortion of the electromagnetic field, the accuracy of such UEMT system becomes low. Several research groups have presented methods for compensating UEMT outputs that are deteriorated by ferromagnetic objects existing around the UEMT. These compensation methods firstly acquired positions and orientations (sample data) by sweeping a special tool (hybrid tool) having a UEMT and an optical tracker (OT) in free-hand. Then a polynomial compensating UEMT outputs is computed from both outputs. However, these methods have following problems: 1) Compensation function is obtained as a function of position, and orientation information is not used in compensation. 2) Although we need to slowly move the hybrid tool to obtain better compensation results, this leads increase of time. To overcome such problems, this paper presents a UEMT-output compensation function that is a function of not only position but also orientation. Also, a new sweeping method of the hybrid tool is proposed in order to reduce the sweeping time required for obtaining sample data. We evaluated the accuracy and feasibility of the proposed method by experiments in an OpenMR operating room. According to the result of experiments, the accuracy of the compensation method is improved about 20% than that of the previous method. We implemented the proposed method in a navigation system for flexible neuroendoscopic surgery and performed a phantom test and several clinical application tests. The result showed the proposed method is efficient for UEMT output compensation and improves accuracy of a flexible neuroendoscopic surgery system.