Magnesium oxide (MgO) nanoparticles are one of the highly significant compounds in construction. The novelty concentrated on using sol–gel technique coupled with ultrasonication for synthesis of MgO nanoparticles to prevent the agglomeration and its effect on the size was investigated. The synthesized samples were characterized by TGA, DSC, XRD, FTIR, SEM, EDX mapping, DLS, and HRTEM. Antimicrobial and antibiofilm activities of MgO nanoparticles were investigated against multidrug-resistant microbes causing-urinary tract infection (UTI). TGA, XRD, and FTIR characterization were used to