Implant placement has been widely used in various kinds of surgery. However, accurate intraoperative drilling performance is essential to avoid injury to adjacent structures. Although some commercially-available surgical navigation systems have been approved for clinical applications, these systems are expensive and the source code is not available to researchers. 3D Slicer is a free, open source software platform for the research community of computer-aided surgery. In this study, a loadable module based on Slicer has been developed and validated to support surgical navigation. This research module allows reliable calibration of the surgical drill, point-based registration and surface matching registration, so that the position and orientation of the surgical drill can be tracked and displayed on the computer screen in real time, aiming at reducing risks. In accuracy verification experiments, the mean target registration error (TRE) for point-based and surface-based registration were 0.31±0.06mm and 1.01±0.06mm respectively, which should meet clinical requirements. Both phantom and cadaver experiments demonstrated the feasibility of our surgical navigation software module.