Highly-extended self-supporting nanoporous Au and Au-Ag alloy thin films can be successfully prepared by a self-assembly method with metal nanoparticles as starting building blocks. The size, structure, and composition distribution of the synthesized nanoporous films were characterized by scanning electron microscopy, energy-dispersive X-ray spectroscopy, transmission electron microscopy, and X-ray diffraction. The experimental results revealed that thermal activation and photoinduced attractive force of nanoparticles cause the particles to be assembled at the air-water interface. The pore size of this new nanoporous material can be controlled by varying the nanoparticle size.