Herein, the zeolitic imidazolate framework-8 template was accommodated onto the surface of a pencil graphite substrate through the electrodeposition system. Then, Zn in the zeolitic imidazolate framework-8 was replaced with Cu atoms via the galvanic replacement procedure. The modified template was used for the synthesis of another metal-organic framework (copper-benzene di carboxylic acid) by a solvothermal method. The prepared fiber was characterized by field emission-scanning electron microscopy, Fourier transform infrared spectroscopy, and X-ray diffraction technique. Then, it was employed for direct immersion solid-phase microextraction of methyl, ethyl, and butyl parabens. Various factors, such as the pH of the sample solution, stirring rate, desorption volume, the concentration of salt, extraction time, and desorption time, were selected and optimized. Under the optimized condition (extraction time = 30 min, desorption time = 2 min, desorption volume = 200 μL, salt concentration = 0% w/v, sample solution pH = 3.0, and stirring rate = 700 rpm), the linearity of the method was in the range of 1–200 μg/L (r2 > 0.9926). The limits of detection and quantification fall between 0.28–0.65 μg/L and 0.91–1.98 μg/L, respectively. The analysis of selected parabens in toothpaste and hand and face lotion, were also done using the suggested methodology.