The increase in the number of infectious diseases has exerted many negative consequences on human health. In this study, the antibacterial cotton fabric was fabricated for application in antibacterial products, contributing to the prevention of infectious diseases for humans. Particularly, ex-situ and in-situ dip-coating techniques were compared and utilized for the fabrication of the antibacterial cotton fabric. Besides, the effects of the concentrations of precursors, including graphene oxide (GO), silver nanoparticles (AgNPs), silver/ graphene oxide nanocomposite (Ag/GO), and dip-coating times were evaluated to determine the most appropriate preparation conditions. Therewithal, the resulting cotton fabric was modified with stearic acid (SA) to enhance the hydrophobicity, in which the concentration of the SA was also assessed. Additionally, the antibacterial performance of the prepared material was investigated against Gram-negative Pseudomonas aeruginosa and Gram-positive Staphylococcus aureus. Different analytical techniques such as scanning electron microscope, contact angle measurement, and color stability were also utilized for the comparison between different cotton fabrics. According to the obtained results, the dip-coated in-situ Ag/GO (in-situ-Ag/GO/cotton) fabrics showed better antibacterial performance than that of dip-coated ex-situ Ag/GO (ex-situ-Ag/GO/cotton) ones, which can be attributed to the even distribution of Ag/GO nanocomposite on the fabric prepared by the in-situ methods. According to the aforementioned results, the resulting antibacterial cotton fabric can be considered a promising material for the production of antibacterial face masks and protective clothing, which can be utilized in hospitals, textile industries, or the manufacture of sport gears.