A novel polymeric precursor was used to synthesize ZrB2 nanofibers via electrospinning technique. Pyrolysis of the precursor at 350 °C plays a significant role in preserving the fibrous morphology. ZrB2 nanofibers were obtained by pyrolyzing the precursor fiber at 1400 °C in argon. Nano-sized ZrB2 (10–30 nm) crystals were randomly distributed in the fibers.