Considering the ever-increasing population and trends in industrialization, it is difficult to detect the toxins produced in food products using traditional techniques. In this study, a potentiometric nanobiosensor technique using selective patterns for Staphylococcus aureus exotoxin was thoroughly considered. A molecular framework and polymer were produced using methacrylic acid (MAA) monomers, which formed covalent bonds between MAA monomers to produce a white polymer. In addition, hydrogen bonds formed between the amino acids of the exotoxin and the MAA functional groups, which functioned as selective sites for the polymer. To evaluate the effect of pH on the S. aureus exotoxin nanobiosensor, diluted solutions of NaOH and HNO 3 were applied for the upper and lower pH levels, respectively. The effect of temperature was tested using distilled water at fixed temperatures. The results showed that the molecular framework polymer (MFP) in the designed biosensor was able to detect an exotoxin density up to 10-3 M at 68 nm of synthesized molecularly imprinted polymer (MIP) during the first 32 days of the experiment (from a total of 56 days). The potential differences remained constants at an optimum pH range of 5.0-8.5 and at an optimum temperature range of 15°C-25°C. Therefore, we concluded that the pH and temperature can affect the precision of a potentiometric nanobiosensor for detecting S. aureus exotoxin.