Recently, long tunnels are becoming more prevalent in Korea, and exits are added at certain sections of the tunnels. Thus, a navigation system should correctly guide the user toward the exit; however, adequate guidance is not delivered because the global navigation satellite system (GNSS) signal is not received inside a tunnel. Therefore, we present an accurate position estimation system using a magnetic field for vehicles passing through a tunnel. The position can be accurately estimated using the magnetic sensor of a smartphone with an appropriate attitude estimation and magnetic sensor calibration. Position estimation was realized by attaching the smartphone on the dashboard during navigation and calibrating the sensors using position information from the GNSS and magnetic field database before entering the tunnel. This study used magnetic field sequence data to estimate vehicle positions inside a tunnel. Furthermore, subsequence dynamic time warping was applied to compare the magnetic field data stored in the buffer with the magnetic field database, and the feasibility and performance of the proposed system was reviewed through an experiment in an actual tunnel. The analysis of the position estimation results confirmed that the proposed system could appropriately deliver tunnel navigation.