Introduction

Metoprolol (MTP) is a selective β1 receptor blocker that is mostly prescribed to treat supraventricular tachycardia, a set of cardiac problems, high blood pressure, and chest pain caused by inadequate heart blood flow [1]. In addition, it’s used to stop migraines and stop more cardiac issues following myocardial infarction [2]. Its structure consists of an aromatic ring joined to an isopropylamino-propan-2-ol backbone via an ether bond [3, 4]. A 2-methoxyethyl group is added as another substitution to this aromatic ring [5]. Its biological action as a beta-blocker depends on both the ether linkage and the presence of the isopropylamino group [6, 7].

MTP belongs to a class of medications called beta-blockers, which function by preventing the heart and blood vessels from being affected by certain naturally occurring compounds in your body, such as adrenaline [8]. This action reduces blood pressure, heart rate, and cardiac strain [9]. MTP has, however, allegedly been used as a doping agent in sports [10], which is concerning since it can provide athletes with unfair advantages in competitive sports and possibly put their health in danger [11].

Doping in sports is a severe problem that erodes the spirit of fair play and puts athletes’ health at great risk [11]. In sports like archery or shooting, where accuracy and steadiness are essential, beta-blockers can provide athletes an unfair advantage by masking the outward signs of nervousness and stabilizing heart rate [12, 13]. Misuse of MTP, however, might have negative effects such as exhaustion, dyspnea, and even heart failure [14]. Therefore, it is crucial to identify MTP in athletes in order to maintain fair competition and protect their health.

It is crucial to find doping substances in food samples for the sake of both public health and fair competitiveness in sports. During the production process, doping agents—such as certain pharmaceuticals and chemical compounds—may unintentionally find their way into the food chain, endangering the health of consumers. Athletes may also inadvertently consume these chemicals through their food, which could result in positive anti-doping test results and eventual disqualification from sporting events. Thus, it is essential to keep an eye out for these compounds’ existence in food in order to guarantee food safety and preserve the fairness of sporting events. In this context, the food business in particular is crucial since strict quality control and testing can help avoid the contamination of food items with undesirable chemicals and pharmaceuticals. This promotes fair and clean sports in addition to protecting consumers.

The significance of identifying MTP in food samples and biological fluids cannot be emphasized, considering its extensive application and susceptibility to abuse [15]. Although there have been uses for conventional detection techniques, including spectrophotometry [16], chromatography [17], fluorescence [18], flow injection [19], and capillary electrophoresis [20], they frequently entail difficult steps and call for costly equipment and knowledgeable personnel. Because of their excellent sensitivity, selectivity, and quick reaction times, electrochemical techniques for analysis have drawn a lot of interest [21, 22]. They provide an economical and effective method for different analyte detection in intricate matrices. These techniques are ideal for on-site and real-time monitoring since they can be easily miniaturized and integrated into portable devices, further improving their quality.

On the other hand, electrochemical sensors have become a viable substitute due to their ease of use, affordability, and superior sensitivity and selectivity [23, 24]. The performance of these sensors has been further improved by the development of nanotechnology, with nanostructures like polypyrrole (PPy) and nickel oxide nanoparticles (NiO NPs) setting the standard [25, 26].

Strong adsorption capacity and a high specific surface area are provided by NiO NPs, which are well-known for their outstanding electrochemical catalytic activity [27, 28]. These characteristics improve sensitivity and stability by increasing the number of active sites on the sensor surface [29]. Furthermore, NiO NPs promote effective electron transfer processes, enhancing the selectivity and accuracy of the sensor [30].

Because of its great biocompatibility, the conductive polymer PPy is appropriate for use in biological contexts [26]. The sensor’s performance is improved by its high conductivity and stable ambient conditions [31]. Additionally, the selectivity and sensitivity of the sensor are improved by the addition of different functional groups or biomolecules due to PPy’s flexible structure [32].

NiO NPs and PPy have a synergistic effect that improves electrochemical sensors’ overall performance [33]. Because of their nanostructure, they have a high density of active sites, which improves sensitivity. Target analytes can be accurately and selectively detected thanks to their superior electron communication characteristics and catalytic efficiency [34, 35]. Additionally, their stability guarantees the lifetime and dependability of the sensor [33, 34, 36]. Since these developments in nanotechnology are opening the door to easier, more affordable, and highly effective detection techniques, NiO NPs and PPy are perfect building blocks for the creation of next-generation electrochemical sensors [37].

For the purpose of detecting MTP, an electrochemical sensor based on a nanocomposite of NiO NPs and PPy was proposed in this study. The NiO NPs/PPy nanocomposite offers a high surface area for analyte interaction and strong electrocatalytic activity by combining the benefits of both NiO NPs and PPy [33, 34, 38]. As a result, MTP detection has increased sensitivity and selectivity. The utilization of the NiO NPs/PPy nanocomposite as a sensing material for MTP detection is what makes this study innovative. To the best of our knowledge, this is the first investigation into this nanocomposite’s potential for MTP electrochemical detection. This novel strategy may open the door to the creation of more dependable and effective sensors for the identification of doping substances in food samples and bodily fluids.

Experimental section

The following materials were used exactly as supplied: potassium nitrate (KNO3, 99% purity), lithium perchlorate (LiClO4, 99% purity), nickel chloride (NiCl2, 98% purity), pyrrole (Py, 98% purity), and phosphate-buffered saline (PBS, 0.1 M), Ascorbic acid (≥ 99.5%), glucose (≥ 99%), dopamine (98%3), NaCl (99%), NaNO3 (≥ 99.0%), NH4NO3 (99.0%), 5-hydroxytryptamine (99%), MgSO4 (≥ 99%), uric acid (≥ 99%), and Na2SO4 (≥ 99%) which were purchased from Sigma-Aldrich, Germany. All of the compounds were used unpurified and were of analytical grade. Throughout the trials, distilled water was utilized.

Princeton Applied Research, USA’s Model 263 A Potentiostat/Galvanostat was used to carry out the electrochemical measurements. The modified GCE served as the working electrode, Pt mesh served as the counter electrode, and Ag/AgCl/KCl(sat.) served as the reference electrode in the three-electrode setup. During the electrodeposition procedure, the electrochemical conditions could be precisely controlled thanks to this configuration. Cyclic voltammetry (CV) and differential pulse voltammetry (DPV) were used to conduct electrochemical studies in a 0.1 M PBS solution and 2.5 mM K3Fe(CN)6 with 1.0 M KCl. The scan rate for CV was established at 20 mV s-1. A pulse width of 50 ms and an amplitude of 20 mV were recorded for the DPV measurements. An X-ray diffractometer (D8 ADVANCE, Bruker, Germany), a scanning electron microscope (JSM-7800 F, JEOL, Japan), and an X-ray photoelectron spectroscope (AXIS Supra, Kratos Analytical, UK) were used to characterize the modified electrodes.

The glassy carbon electrode (GCE) was prepared by first polishing its surface using an alumina slurry to make it smooth. After that, distilled water was used to properly rinse it in order to get rid of any last bits of alumina. After being cleaned and dried with a nitrogen stream, the GCE was prepared for electrodeposition. In order to guarantee that the PPy and NiO NPs stick to the GCE surface properly, this step is essential. Three separate GCE modified by nickel oxide nanoparticles (NiO NPs) and polypyrrole (PPy) configurations were created: a GCE coated with NiO NPs (NiO NPs/GCE), a GCE coated with PPy (PPy/GCE), and a GCE coated with a composite of NiO NPs and PPy (NiO NPs/PPy/GCE). A Model 263 A Potentiostat/Galvanostat (Princeton Applied Research, USA) with a three-electrode system was used for the electrodeposition and electropolymerization processes. Pyrrole electropolymerization in an aqueous solution containing 10.0 mM of pyrrole and 0.10 M LiClO4 took five minutes to complete, yielding PPy/GCE [39, 40]. At a scan rate of 20mV s-1, the potential ranged from − 0.2 to + 1.0 V vs. Ag/AgCl/KCl (sat.). NiO NPs were electrodedeposited under potentiostatic conditions in a supporting electrolyte of 0.10 M KNO3 containing 0.01 M NiCl2 at a constant potential of -1.1 V vs. Ag/AgCl/KCl (sat.) for 10 min in order to prepare NiO NPs/GCE [40]. Pyrrole was electropolymerized, and then NiO NPs were electrodedeposited to create the NiO NPs/PPy nanocomposite on the GCE surface.

Apple juice was used as the food sample for preparation. Before being used, the apple juice was kept at 4 °C after being bought at a nearby market. To eliminate any particles, the apple juice was passed through a 0.45 μm membrane filter before examination. After that, metoprolol concentrations that were known to exist were added to the filtered apple juice. For the purpose of the recovery tests, the spiked apple juice samples were diluted with 0.1 M PBS to the appropriate concentration. Human urine samples were used in the preparation of the biological samples for analysis. The healthy individuals who had never taken metoprolol before provided urine samples. Until they were used again, the samples were kept at -20 °C. The urine samples were defrosted at room temperature and centrifuged for 15 min at 4000 rpm to eliminate any particles before analysis. After that, the supernatant was gathered and metoprolol in known amounts was added. For the recovery investigations, the spiked urine samples were diluted with 0.1 M PBS to the appropriate concentration. The examination of the actual samples in the electrochemical cell was conducted using an unconventional technique. This included doing the electrochemical analysis in 0.1 M PBS and adding a known quantity of metoprolol standard to the sample in the electrochemical cell. In order to evaluate the reliability and accuracy of our experimental results, we performed statistical analysis. Four tests were conducted for each condition, and the findings are shown as mean ± standard deviation (SD). Relative standard deviation (RSD%) was calculated to assess the NiO NPs/PPy/GCE sensor’s repeatability. Furthermore, in compliance with the 3σ/slope and 10σ/slope requirements, the detection and quantification limits were established using the calibration curve’s slope and the response standard deviation, respectively. In addition, we ran a one-way analysis of variance to determine the statistical significance of the differences in the means of the recovery rates.

Results and discussion

Figure 1 displays the SEM images of the surface morphology of the NiO NPs/PPy/GCE structure. The NiO NPs and PPy nanocomposite, which combine the characteristics of both components, are visible in the SEM image. The nanocomposite has a structure resembling a network because the NiO NPs are distributed throughout the PPy matrix. This arrangement improves the electrolyte ions’ accessibility, which is advantageous for uses like electrochemical sensors.

Fig. 1
figure 1

SEM image of NiO NPs/PPy/GCE

Figure 3 displays the XRD patterns of PPy, NiO NPs, and NiO NPs/PPy composite powders. Characteristic peaks in the XRD pattern of NiO NPs are located at 37.22°, 43.25°, 62.79°, and 75.31°, respectively. These correspond to the (111), (200), (220), and (311) diffraction planes. Face-centered cubic-phase NiO (JCPDS card no. 47-1049) [41, 42]. 1t can be linked to every reflection in the XRD pattern. The high peak intensity suggests a high crystallinity level for the NiO NPs. The absence of peaks from any other phases suggests that the product is extremely pure. Furthermore, the absence of any Ni substrate peaks indicates that the NiO NPs are evenly electrodeposited on GCE surface 1. A large, amorphous diffraction peak may be seen in the pure PPy pattern at roughly 2θ = 24°–25° [43,44,45]. A large peak at roughly 2θ = 24°–25° and peaks corresponding to NiO NPs are visible in the XRD pattern for the NiO NPs/PPy composite.

Fig. 2
figure 2

XRD patterns of powders of NiO NPs, PPy, and NiO NPs/PPy composite

The surface oxygen and functional groups of the NiO NPs/PPy nanocomposite were ascertained by XPS analysis. The complete survey scan spectrum, shown in Fig. 3A, indicates the presence of four elements: C, N, Ni, and O. The two primary peaks of the Ni 2p spectra in Fig. 2B are located at 856.2 and 874 eV, respectively, and correspond to the Ni 2p3/2 and Ni 2p1/2 spin orbit levels [46, 47]. The binding energy gap between Ni 2p3/2 and Ni 2p1/2 is about 17.8 eV, which indicates that the nanocomposite contains Ni2+ and Ni3+ [48, 49]. Between 398 and 399 in Fig. 3C.4 eV are seen in the N1s spectrum, with the neutral N being assigned a peak at 399 eV in all cases and NH– and N+ within PPy receiving a peak at 398 eV, respectively [50]. A single peak at 532.5 eV, which is present in the O 1s spectrum as revealed in Fig. 3D, can be seen as a transition from the O 1s core state to the unoccupied levels of O 2p hybridized with the metal 3d states [51, 52].

Fig. 3
figure 3

XPS spectra of NiO NPs/PPy nanocomposite (A) survey spectrum, high resolution XPS spectra of (B) Ni 2p, (C) N 1s, and (D) O 1s

CV was used to evaluate the electrocatalytic effectiveness of GCE, NiO NPs/GCE, PPy/GCE, and NiO NPs/PPy/GCE for the oxidation of MTP. The typical CV curves obtained at these electrodes in 2.5 mM K3Fe(CN)6 with 1.0 M KCl acting as the electrolyte are shown in Fig. 4A. It is clear that the NiO NPs/PPy/GCE exhibits a higher capacitance than the GCE, NiO NPs/GCE, and PPy/GCE, pointing to the NiO NPs/PPy’s moderating effect on the GCE. It is true that the Randles–Sevcik equation holds for a reversible process. Thus, 0.056, 0.109, 0.124, and 0.206 cm2 are the effective surface areas of the GCE, NiO NPs/GCE, PPy/GCE, and NiO NPs/PPy/GCE, respectively. The Randles–Sevcik equation is represented as 𝐼𝑝 = (2.69 × 105) 𝑛3/2 𝐴 D½ ν½ 𝐶, where Ip is the peak current, n is the number of electrons, A is the effective surface area of the electrode (in cm2), C is the concentration (in mol/cm3), D is the diffusion coefficient (in cm2/s), and v is the scan rate (in V/s).

We looked at the GCE, NiO NPs/GCE, PPy/GCE, and NiO NPs/PPy/GCE CV curves for the oxidation of MTP in a pH 7.0 PBS solution. The CV curves of modified electrodes and bare GCE are displayed in Fig. 4A, both with and without 200 μM MTP. In the MTP-free electrolyte solution, as shown, not a single electrode exhibits a peak. When MTP is added, GCE and NiO NPs/GCE show very few changes in electrochemical peak current. Nevertheless, upon the addition of MTP, both PPy/GCE and NiO NPs/PPy/GCE exhibit notable electrochemical current responses. The electrochemical current response of NiO NPs/PPy/GCE is remarkably twice that of PPy/GCE. This suggests that the combination of NiO NPs and PPy increases the electrocatalytic current by increasing the electrode conductivity and effective surface area, which in turn permits the loading of a greater number of MTP molecules. The stability of the produced electrocatalytic currents for the first cycle and for 75 consecutive cycles is displayed in Fig. 4B. The resultant current exhibits little stability in the PPy/GCE, but NiO NPs/PPy/GCE exhibit amazing stability.

MTP is determined electrochemically based on its oxidation reaction on the electrode surface, which can be amplified with the use of an appropriate modifier. The presence of a high surface area and active sites of NiO NPs for the oxidation of MTP make the NiO NPs/PPy composite a potential modifier for the electrochemical sensing of MTP. Additionally, PPy’s strong conductivity and good compatibility with NiO NPs can help transport electrons and keep NiO NPs from aggregating. The NiO NPs/PPy combination increases the electrode’s stability and electrocatalytic activity through a synergistic effect [53]. Compared to bare GCE or NiO NPs/GCE, the NiO NPs/PPy composite has a bigger electrochemical surface area and a lower charge transfer resistance, which can increase the sensor’s sensitivity and selectivity [54]. In a PBS solution with a pH of 7.0, the oxidation peak of MTP can be seen at about 0.79 V (vs. Ag/AgCl). The following formula can be used to represent the MTP oxidation reaction [53, 54]:

MTP + 2H2O → MTP+ + 2e + 2OH.

As a result, the electrode modified with NiO NPs/PPy composite can be utilized as an easy-to-use, accurate, and sensitive electrochemical sensor to measure MTP in biological and pharmaceutical samples.

Fig. 4
figure 4

(A) CV curves of electrodes in 2.5 mM K3Fe(CN)6 with 1.0 M KCl as the electrolyte, (B) the CV curves of GCE, NiO NPs/GCE, PPy/GCE, and NiO NPs/PPy/GCE in absence (dashed line) and presence (solid line) of 200 μM MTP in a PBS solution at pH 7.0, and (C) The stability of the obtained electrocatalytic currents for first cycle (solid line), and after 75 successive cycles (dashed line)

A number of experimental parameters, such as the pH of the 0.1 M PBS, the concentration of NiCl2, and the electrodeposition time, were carefully modified in an attempt to optimize the electrochemical signal for NiO NPs/PPy/GCE. It was discovered that these elements had a major impact on NiO NPs/PPy/GCE’s electrochemical current responsiveness. According to our research, the electrode material (NiO NPs/PPy/GCE) and the electrochemical behaviour of 200 μM MTP in 0.1 M PBS are significantly influenced by the pH of the solution. The analyte’s charge and the electrode’s surface charge can both be impacted by pH, which in turn can have an impact on how the two interact. The analyte’s detection depends on this interaction. After observing that the electrochemical current responses changed with pH, the various pH settings for the PBS solution were rested. The reason for this variance in response is the analyte’s and the electrode surface’s changes in charge at various pH levels. We tested different pH values and discovered that the best CV response was obtained at a pH of 7.0. This indicates that the most sensitive and precise detection of MTP may be achieved at this pH level because the charge circumstances are ideal for the interaction between MTP and the NiO NPs/PPy/GCE. Thus, we were able to maximise the sensor’s effectiveness for MTP detection by carefully regulating the pH.

NiO NPs/PPy/GCE, which was created by electrodepositing NiO NPs under potentiation conditions in a supporting electrolyte of 0.10 M KNO3 with varying concentrations of NiCl2, was the subject of CV measurements. For ten minutes, this was carried out at a steady potential of -1.1 V vs. Ag/AgCl/KCl (sat.). The NiO NPs/PPy/GCE, which were synthesized under electrodeposition in a supporting electrolyte of 0.10 M KNO3 containing 0.01 M NiCl2, as shown in Fig. 5B, had the highest MTP detection peak current, indicating that this concentration of NiCl2 was ideal.

The NiO NPs/PPy/GCE was further characterized using various electrodeposition periods (2, 5, 8, 10, and 12 min) for the production of the NiO NPs/PPy nanocomposite on GCE once the ideal NiCl2 concentration was established. As can be observed from Fig. 5C, when the NiO NPs were electrodeposited for 10 min on the PPy/GCE surface, the sensor showed the maximum MTP-detecting peak current.

Fig. 5
figure 5

Results of (a) effect PBS pH value on MTP oxidation peak current obtained using CV analyses in 0.1 M PBS containing 200 μM MTP, (b) The effect of NiCl2 concentrations and (c) NiO NPs electrodeposition time in the electrode preparation procedure of NiO NPs/PPy/GCE for oxidation MTP in 0.1 M PBS containing 200 μM MTP

Figure 6A illustrates the influence of varying MTP concentrations (0-1600 μM) on the electrocatalytic oxidation of MTP at the NiO NPs/PPy/GCE. Anodic peak currents at 0.76 V rose linearly with MTP concentration, indicating NiO NPs/PPy’s good and consistent electrocatalytic activity. Equation was used to express the linear relationship between the peak currents and the MTP concentrations (0–1600μM), as Fig. 6B illustrates. For 10–1600 μM MTP, the equation is Ipa (μA) = 0.2957 + 0.03078 C (μM), and its R2 value is 0.99908. For every MTP concentration, the trials are conducted three times. A sensitivity of 0.03074 μA/μM is achieved. The estimated values for the suggested sensor’s LOD and LOQ are 0.018 μM and 0.581 μM, respectively. According to these findings, the NiO NPs/PPy/GCE combination has a high MTP detection sensitivity and selectivity. Furthermore, as shown in Table 1, the electrocatalytic activity of the NiO NPs/PPy/GCE for MTP detection was on par with or superior to several of the MTP sensors that have been previously described. There is a lot of promise for MTP sensing in actual samples, such biological samples, using the NiO NPs/PPy composite based sensor. Our NiO NPs/PPy/GCE sensor shows a lower limit of detection for MTP and a larger analytical linear range when compared to similar recent efforts. This suggests that it has greater MTP detection sensitivity and accuracy. Moreover, the linear increase of anodic peak currents with MTP concentration indicates that our sensor exhibits good and consistent electrocatalytic activity. Our NiO NPs/PPy/GCE sensor is a promising instrument for MTP sensing in real materials, such biological samples, because of these benefits.

Fig. 6
figure 6

(A) DPV curves and (B) the calibration curve of NiO NPs/PPy/GCE in 0.1 M PBS solution (pH 7.0) containing MTP ranging from 0 nM to 1600 μM

Table 1 Comparison between the current study for determination MTP and the results reported in recent research

The electrocatalytic activity, reproducibility, and stability of the proposed MTP sensor were investigated because of their significance for practical uses. Six distinct electrodes were created, and 200 μM of MTP was measured in a 0.1 mM pH 7.0 phosphate buffer in order to assess the reproducibility of the sensor. The stability of the sensor was examined using a single modified electrode for MTP measurements at similar concentrations for a continuous 25 days. Figure 7A and B’s relative standard deviation (RSD) figures for the long-term stability and repeatability tests demonstrate that DPV was used for the measurements. Over the duration of the 25-day period, the values were 4.07%, and over six electrodes, they were 4.11%. These findings suggest that the NiO NPs/PPy/GCE could be a useful platform for determining the MTP levels in actual samples.

The selectivity of the suggested MTP sensor was examined by incorporating various potential interfering compounds into the electrochemical MTP detection procedure using the NiO NPs/PPy/GCE and DPV. As Fig. 7C shows, the current response of the MTP sensor, which is based on this electrode, was essentially unaffected by interfering chemicals such as ascorbic acid (AA), glucose (GL), dopamine (DA), NaCl, NaNO3, NH4NO3, 5-hydroxytryptamine (5-HT), MgSO4, uric acid (UA), and Na2SO4. The low impact of these drugs on the MTP readings is indicated by the RSD being less than 5.41%. As a result, the electrode based on the composite of NiO NPs and PPy may be used to correctly calculate MTP.

Fig. 7
figure 7

(A) Plot of the DPV current peak of six NiO NPs/PPy/GCEs for the detection of 200 μM MTP; (B) Long-term stability of NiO NPs/PPy/GCE for continuous 200 μM MTP detection for 25 days. (C) Electrochemical signal responses of the immunosensor to 200 μM MTP, and 200 μM MTP + 200 μM interfering species

Real samples were used to evaluate the suggested method’s validity and accuracy. Using real test samples, such as apple juice and human urine, DPV measurements were used to assess the accuracy of the suggested sensing technique. Table 2 displays the findings of analytical investigations that were carried out utilizing the conventional addition technique. Relative standard deviation values were low (below 4.16%) and the processed urine sample produced good recovery rates ranging from 98.40 to 99.86%. Analyzing the produced apple juice sample also revealed low relative standard deviation values (less than 4.28%) and respectable recovery rates ranging from 97.20 to 99.66%. The average recovery rate and standard deviation of the recovery rates are shown by the terms Mean Recovery (%) and SD (standard deviation), respectively. With a standard deviation of 1.02% for apple juice samples and 0.68% for urine samples, the mean recovery rate was 98.77% and 98.99%, respectively. These results confirm the high precision and efficacy of the NiO NPs/PPy/GCE technique for MTP detection in bodily fluids and dietary samples.

These results confirm the high precision and efficacy of the NiO NPs/PPy/GCE technique for MTP detection in bodily fluids and dietary samples.

Table 2 The results of analytical analyses using DPV measurements for prepared from real samples. (n = 5)

Conclusion

Through this work, a novel electrochemical sensor for the detection of the doping agent MTP in food samples and bodily fluids has been effectively presented. Based on a nanocomposite of PPy and NiO NPs on a GCE (NiO NPs/PPy/GCE), the sensor has shown a number of noteworthy benefits. The electrodeposition and electropolymerization processes used in the sensor’s production are inexpensive and environmentally beneficial. The resultant structure of the nanocomposite combines the advantages of PPy and NiO NPs, offering good electrocatalytic activity and a large surface area for analyte interaction. As a result, MTP detection has increased sensitivity and selectivity. DPV measurements from actual test samples—such as apple juice and human urine—were used to evaluate the sensor. The results showed low relative standard deviation values and good recovery rates, indicating the high precision and dependability of the suggested approach. Still, this research has inherent limits just like any other study. Subsequent research endeavours may concentrate on enhancing the sensitivity and selectivity of this sensing methodology, investigating its possibilities in alternative contexts, and resolving any constraints noted in this investigation. This research has wide-ranging consequences. Food analysis could undergo a revolution with the development of more dependable and effective sensors for the detection of doping agents in food samples and biological fluids, guaranteeing food safety and quality. These sensors could be utilized in the sports industry to keep an eye on athletes’ well-being and performance, inspect the caliber and safety of sporting goods, and guarantee the environmental sustainability of sporting events. To sum up, this work represents a substantial development in the field of electrochemical sensors. The novel methodology and encouraging outcomes highlight the NiO NPs/PPy nanocomposite’s potential as a sensing material for MTP detection. For the purpose of creating inexpensive, environmentally friendly, and effective sensors with a variety of uses in the food business and sports, it is crucial that research in this area continues. In conclusion, this work signifies a significant advancement in the electrochemical sensor sector. In summary, our NiO NPs/PPy/GCE sensor has shown excellent selectivity and sensitivity in the identification of metoprolol (MTP), along with a low detection limit and a broad analytical linear range. Carefully regulating experimental variables like the pH of the PBS solution, the concentration of NiCl2, and the electrodeposition duration allowed for the optimization of the sensor’s performance. The sensor’s potential for MTP sensing in real samples, such biological samples, is shown by its better performance when compared to a number of previously reported MTP sensors. The promising results and innovative methods demonstrate the potential of the NiO NPs/PPy nanocomposite as a sensing material for MTP detection. It is critical that research in this field continues in order to develop low-cost, environmentally friendly, and highly effective sensors with a wide range of applications in the food industry and sports.