Objective:A localization system for multiple magnetic targets based on magnetic sensor rotation detection was studied,which was aimed at realizing human multiple capsule endoscopy positioning and nano-magnetic drug testing. Methods:A three-axis tunneling magnetoresistive sensor was used to make a circular motion near the magnetic source. Three sets of magnetic signals were acquired and transferred by three-dimensional coordinates. The position of the permanent magnet was solved using a positioning algorithm. Results:Through the preparation of LabVIEW PC program,the trajectory of two magnetic target tracking and motion curve storage and playback were achieved. Conclusion:The detection system has the advantages of good real-time,high precision and low cost,it has the potential application value for the positioning of multiple capsules in the human body and the detection of nano-magnetic drugs.