Biocompatible polymer membranes are currently in increasing demand, especially those containing homogeneously distributed nanoparticles for medical applications. This research aims to develop a clean and effective approach using pulsed laser ablation. Silver nanoparticles (AgNPs) and gold nanoparticles (AuNPs) have been used as antibacterial agents in the consumer goods, cosmetics, and food industries. In this work, silver and gold nanoparticles were synthesized in a polyethylene glycol (PEG) medium using pulsed laser ablation. The fabricated films were characterized using Fourier transform infrared spectroscopy (FTIR) to identify functional groups, UV–Vis spectroscopy to analyze optical properties, and field emission scanning electron microscopy (FESEM) to examine surface morphology and nanoparticle distribution. In addition, the antibacterial activity was evaluated using the agar diffusion method. The results showed spherical nanoparticles with a polydisperse size distribution, indicating that the medium supports the production of small, well-dispersed nanoparticles, which was reflected in the uniform surface morphology and enhanced antibacterial performance. The results showed spherical nanoparticles with a polydisperse size distribution, indicating that the medium supports the production of small and stable silver nanoparticles, which contributed to reduced aggregation and exhibited enhanced antibacterial performance. The produced silver and gold nanoparticles have been successfully used as an antibacterial agent, as experimentally demonstrated using (Staphylococcus aureus), Enterococcus faecalis, Escherichia coli, and Klebsiella pneumoniae). The results showed that the manufactured silver and gold nanoparticles exhibited significant antibacterial activity against Staphylococcus aureus, with larger zones of inhibition observed compared to other tested samples, indicating an enhanced antibacterial activity based on the results of the assay.