In order to prevent collision of complex structure well, accurate measurement of the distance of adjacent wells must be required during the development of the unconventional reservoir. The precision of the traditional survey tools and scanning software is not accurate enough. Based on the electromagnetic anticollision measuring calculation method, the electromagnetic anticollision detection tool was designed and simulation experiments were carried out. The influence of different position relations between sensor and casing on magnetic field strength detected by the sensor was analyzed. When the sensor and the casing were parallel and the distance of them was 0.5 m∼3 m, the tool could calculate accurately the distance and orientation of the adjoining well. When the angle between the sensor and the casing was within 50°, the calculation result was accurate. This research result validated the accuracy of the principle of the electromagnetic anticollision tool while drilling cluster well, and it could provide theoretical support for the development of electromagnetic detection tools.