In recent years, solar seawater desalination has been considered to be a promising and cost-effective technique to produce clean sources for water treatment and water deficiency. In addition, this technique shows high photothermal conversion efficiency by solar collectors to transfer solar energy into heat and the transformation of molecules in the capillaries of solar evaporators. In this study, we report the preparation of graphene-supported MIL-125 with polyurethane foam (MGPU) for solar steam generation. We modified MGPU by using the plasmonic nanoparticles of Ag and a polymer of polyaniline to increase the evaporation rate. Polyurethane foam can float on the surface of water and self-pump water by its hydrophilic porous structure, superior thermal insulation capabilities, and easy fabrication. MIL-125 has a high salt rejection and higher water permeability. It can reduce the affinity between water molecules and the pore surface of membrane, making it simple for water molecules to move through the pores. GO is a great alternative for steam generation applications since it exhibits broad-band light. The strong solar absorption, photothermal conversion efficiency, and photoreaction efficiency are enhanced by the use of silver nanoparticles in the photoreaction. The salt resistance capability is enhanced in saline water in the presence of polyaniline in a composite. Under one solar irradiation, the Ag/PANI/GO@MIL-125 (Ag-PMG) nanocomposite demonstrates an average 1.26 kg m2h−1rate of evaporation and an efficiency as high as 90%. The composite exhibits remarkable stability and durability after more than 10 cycles of use without a noticeable decrease in activity. In addition, the composite exhibits excellent organic dye removal from contaminated water and generates pure condensed freshwater. The antibacterial photoactivity of the photocatalysts was examined againstB. subtilisandE. coli. The results demonstrate that Ag-PMG shows higher antibacterial activity than MIL-125 and PMG. It was shown that the presence of rGO, PANI, and Ag in the sample enhances the antimicrobial activity.