Improving the evaporation rate of solar steam generation (SSG) has always been a research hotspot to solve the shortage of water resources. Using cotton, Fe3O4, polyvinyl alcohol (PVA) and diatomite (DM) as raw materials, DM/PVA/Fe3O4@cotton composites with both firmness and hydrophilicity were prepared. Fe3O4 has a wide range of light absorption characteristics and good photothermal conversion performance, and is an ideal photothermal conversion material. PVA enhances the adhesion between Fe3O4, cotton and DM and enhances the hardness of the sample and the internal porous structure. The existence of DM greatly improves the hydrophilicity of the sample, ensuring that the water in the lower layer can be continuously transported to the surface of the sample, and DM makes the surface of the sample rough, which reduces the reflection of sunlight and improves the efficiency of light heat conversion. Under one-sun irradiation, the temperature of the sample surface increases by 52.6 °C, the evaporation rate can reach 1.32 kg m−2 h−1 and the evaporation efficiency is 82.9%. Using this sample as the photothermal conversion layer of the SSG device, the removal rate of salt ions in seawater is more than 98% and the removal rate of heavy metal ions in sewage is close to 100%. This work provides a new idea and design method for SSG in the field of seawater desalination and sewage treatment.