Train detection, as part of the railway signaling system, is important for safe operation of high-speed railway. The recent flourishing development of high-speed railway stimulates the research need of train detection technology to enhance the safety and reliability of train operation. This paper proposes a new technique for train detection through magnetic field measurement by giant magnetoresistive sensors. This technology was studied by the analysis of magnetic field distribution in the high-speed rail system obtained from modeling and simulation. The results verify the feasibility for detection of train presence, number of rolling stocks, speed, and length. It can overcome the limitations of track circuits and provide additional measurement capabilities to the signaling system. This detection system can be built with low cost and minimal maintenance load as well as compacted construction. Therefore, it may serve as a new train detection system to help improve the current systems, enhancing and promoting the safety and reliability of high-speed rail system.