In view of the defects of the NAND Flash wear leveling caused by the block selection policy in Yaffs2 file system, the heat calculation method of file update and block recycling was introduced. The data with different heat was separated into the corresponding physical blocks, thus the free block selection policy could be improved. And the degree of dispersion and wear leveling was adopted to improve the wear leveling by choosing the most effective garbage collection strategy in different situations. The QEMU and embedded Linux was used as the simulation platform. The performance metrics used was the number of copy operations, the number of erase operations, the maximum erase count for all blocks, the maximum erase count for all blocks, the maximum difference in the erase counts, and the standard deviation of the erase counts. The simulation results show that the improved method can greatly improve the efficiency of garbage collection, and can effectively improve the degree of wear leveling and prolong the service life of NAND Flash equipments.