A new optimization method of ghost imaging by combining multiple speckle patterns was proposed. Firstly, the multiple speckle patterns irradiated on the target object are sorted to reduce the difference between adjacent speckle patterns in the order of smallest to largest in the value of the bucket detector. Secondly, the adjacent speckle patterns are combined to create a new speckle pattern, and the corresponding values of the bucket detector are modulated to a new bucket detector value. This process enables effectively reduce the redundancy and number of data to be associated. Finally, using three different correlation calculation rules to reconstruct of the target object. Numerical simulation results show that for the grayscale image, the proposed method with 4 000 measurements has a higher peak value than traditional ghost imaging, differential ghost imaging, and positive-negative ghost imaging under uncombined and modulated case. The peak signal-to-noise ratio/contrast has been improved by 21.7%/27.3%, 8.3%/17.8% and 14.7%/25.7%, respectively. Through the numerical simulation and result analysis of 20 target images, it is found that 90%/85% and 50%/55% of peak signal-to-noise ratio/contrast enhancement rates are above 15% and 30% respectively, and it shows that the proposed method has good universality and popularization value.