The invention provides a panchromatic and multispectral image fusion method based on two-step sparse coding and wavelet transformation. The method comprises the following steps of data preprocessing,high-low resolution dictionary, one-step sparse coding, two-step sparse coding, two-step sparse coefficient merging, sparse coefficient reconstruction to obtain a fused image, wavelet transformation,high-frequency component fusion, low-frequency component fusion and inverse transformation. According to the invention, the algorithm efficiency can be improved through the two-step sparse coding algorithm, at the same time, the sparse coefficient is solved through two-step sparse coding, and the precision of sparse representation is improved; the problem of spectral distortion is solved, the fusion result can be improved through fusion according to the principle of maximum absolute value, the fusion result is clear in image and rich in detail information, the spectral information and the original image are the highest in consistency, the operation time is short, wavelet transformation is carried out through full-color and multispectral images, and the method is a rapid, efficient and effective fusion method.