Recently, magnetic-field sensors based on an electron spin of a nitrogen vacancy center in diamond have been studied both from an experimental and theoretical point of view. This system provides a nanoscale magnetometer, and it is possible to detect a precession of a single spin. In this paper, we propose a sensor consisting of an electron spin and a nuclear spin in diamond. Although the electron spin has a reasonable interaction strength with magnetic field, the coherence time of the spin is relatively short. On the other hand, the nuclear spin has a longer lifetime while the spin has a negligible interaction with magnetic fields. We show that, through the combination of such two different spins via the hyperfine interaction, it is possible to construct a magnetic-field sensor with the sensitivity far beyond that of previous sensors using just a single electron spin.