This paper presents a compact broadband antenna that is used in the spin-state-based magnetic field quantum sensor. In the diamond nitrogen-vacancy (NV) centre system, the qubit resonance is excited by the microwave signal, and the frequency shift is proportional to the external magnetic field strength. Conventional narrow-band antennas or single resonators are not able to match the resonance frequency of the NV centre over a wide bandwidth, resulting in degraded sensitivity and dynamic range of the sensor. Here, the authors designed a compact broadband antenna, which achieves a fractional bandwidth of 71.43% at the Zeeman splitting frequency of 2.87 GHz. With the introduced slot structure on the antenna, a higher microwave near field strength can also be achieved, which improves the magnetic field sensitivity and dynamic range. By applying our design antenna, the experimental results indicate that the NV-based quantum sensor achieves a sensitivity of 3.07 μT/Hz 1/2 and a dynamic range up to 44.9 dB, which are both greatly improved compared to sensor that uses a conventional antenna.