Transient magnetic field sensors are used in various electromagnetic environment measurement scenarios. In this paper, a novel magnetic field sensor based on a digital integrator was developed. The antenna was a small B-DOT loop. It was designed optimally for the simulation. The magnetic field signal was digitally integrated with the improved Al-Alaoui algorithm, resulting in less integration error. To compensate for the bandwidth loss of the optical fiber system, we specially designed an FIR (finite impulse response) filter for frequency compensation. The circuit was described, and the transimpedance amplifier was specially designed to ensure the low noise characteristic of the receiver. The sensitivity of the sensor was calibrated at 68.2 A·m−1/mV, the dynamic range was 50 dB (1–300 kA/m), the linear correlation coefficient was 0.96, and the bandwidth was greater than 100 MHz. It was tested and verified under the action of an A-type lightning current. The sensor exhibited high-precision performance and flat amplitude-frequency characteristics. Therefore, it is suitable for lightning positioning, partial discharge testing, electromagnetic compatibility management, and other applications.