The Ice, Cloud, and land Elevation Satellite-2 (ICESat-2), which is equipped with the Advanced Topographic Laser Altimeter System (ATLAS), was launched successfully in 15 September 2018. The ATLAS represents a micro-pulse photon-counting laser system, which is expected to provide more comprehensive and scientific data for carbon storage. However, the ATLAS system is sensitive to the background noise, which poses a tremendous challenge to the photon cloud noise filtering. Moreover, the Density Based Spatial Clustering of Applications with Noise (DBSCAN) is a commonly used algorithm for noise removal from the photon cloud but there has not been an in-depth study on its parameter selection yet. This paper presents an automatic photon cloud filtering algorithm based on the Particle Swarm Optimization (PSO) algorithm, which can be used to optimize the two key parameters of the DBSCAN algorithm instead of using the manual parameter adjustment. The Particle Swarm Optimization Density Based Spatial Clustering of Applications with Noise (PSODBSCAN) algorithm was tested at different laser intensities and laser pointing types using the MATLAS dataset of the forests located in Virginia, East Coast, and the West Coast, USA. The results showed that the PSODBSCAN algorithm and the localized statistical algorithm were effective in identifying the background noise and preserving the signal photons in the raw MATLAS data. Namely, the PSODBSCAN achieved the mean F value of 0.9759, and the localized statistical algorithm achieved the mean F value of 0.6978. For both laser pointing types and laser intensities, the proposed algorithm achieved better results than the localized statistical algorithm. Therefore, the PSODBSCAN algorithm could support the MATLAS photon cloud data noise filtering applicably without manually selecting parameters.