We demonstrate an optical fiber displacement sensor based on the Vernier effect, consisting of a single-mode fiber (SMF) and a section of capillary with an internal movable microsphere freely controlled forward and backward by a half-taper. The antiresonance is inhibited to purify the reflectance spectra by optimizing the capillary length. The interference of three beams reflected from the splicing interface, front and rear surfaces of the microsphere, respectively, hence results in the Vernier effect due to combined cavities. By adjusting the distance between the splicing interface and front surface, an appropriate Vernier effect can significantly enhance the displacement sensitivity up to 344.8 pm/nm, with a subnanometer resolution of 0.058 nm. The proposed device has advantages such as simple fabrication process, compact size, and ultrahigh sensitivity, showing a great potential in displacement sensing applications.