Direct borohydride fuel cell (DBFC) as a direct alkaline liquid fuel has some benefits over other gaseous fuel cells because of great theoretical voltage, power density, energy density, environmental friendliness, and fast answer. Also, sodium borohydride (NaBH4) is simply storable, chemically steady, and safe as it is non-flammable. In this work, UiO-66 metal–organic framework (MOF) has been prepared and defined by X-ray diffraction (XRD), nitrogen sorption isotherms, Fourier transform infrared (FT-IR), thermogravimetric analysis (TGA), and field emission scanning electronic microscopy (FESEM) techniques. The appearance of sharp peaks in the XRD pattern indicates that there is worthy crystallinity in the organized MOF and there are no impurities. The BET surface area was obtained to be 1253.1 m2 g−1. The modified carbon paste electrode (CPE) by this MOF and nickel hydroxide (Ni(OH)2-UiO-66/CPE) was applied as an effective and simple electrode for electro-oxidation of NaBH4 in the alkaline media. The anodic current of NaBH4 was amplified intensely at the Ni(OH)2-UiO-66/CPE contrary to the bare CPE surface. The influence of modifier amount (UiO-66) in the constructed CPE, the concentration of NaOH and nickel chloride, and the time for Ni(II) loading were considered for NaBH4 electrocatalytic oxidation via response surface methodology. The attained consequences identify that Ni(OH)2-UiO-66/CPE exhibits good electrocatalytic activity for NaBH4 oxidation due to microporous building and great surface area of synthesized UiO-66. The catalytic rate constant was attained to be 1.53 × 103 cm3 mol−1 s−1, and the diffusion coefficient was found to be 1.51 × 10−7 cm2 s−1. The fabricated Ni(OH)2-UiO-66/CPE displayed worthy reproducibility and stability, and it has a small cost and background current and ease of surface regeneration. The Ni(OH)2-UiO-66/CPE has enhanced poisoning tolerance ability than Ni(OH)2/CPE for electrocatalytic oxidation of NaBH4 and is a superior sensor for the extensive duration action. According to the obtained chronoamperograms in 3000 s, it can be confirmed that the Ni-UiO-66/CPE electrode has improved the toxicity tolerance compared to the unmodified CPE and is a superior nanosensor for long-term acquisition. Also, the Ni(OH)2-UiO-66/CPE maintained 91% and 77.9% of its preliminary answer after 14 and 90 days by CV technique, respectively, which proposes that it has good stability.