Freeform metasurfaces based on topology optimization enable precise control over electromagnetic functionalities, with widespread applications in metagratings, metalenses, and polarization transformations. The selection of the initial structure plays a crucial role in determining the quality of the final optimization results. In this study, a global initial solution-based topology optimization (GISTO) is proposed to design a polarization beam merging metagrating efficiently. A two-dimensional encoded non-dominated sorting genetic algorithm II is employed for global exploration to obtain a high-quality initial structure, which is then refined using gradient-based topology optimization for a local optimization design. By integrating global and local optimization, the efficiency of polarization beam merging metagrating is significantly improved. Under symmetric incidence, the efficiencies for x-polarized and y-polarized beams reach 93.6% and 95.3%, respectively, while under asymmetric incidence, the efficiencies achieve 99.4% and 95.4%, respectively.