The addition of coal gangue (CG) helps to reduce pollutant emissions and slagging during biomass combustion. Potassium (K) and chlorine (Cl) are the key elements responsible for biomass slagging; however, the effect of CG addition on their conversion mechanism is unclear. To effectively reduce biomass combustion slagging problems, in this work, the effect of adding 10%, 20% and 30% CG on the migration and transformation patterns of K and Cl elements during rice straw combustion was investigated by tube furnace combustion tests and thermodynamic simulations. The results showed that with the increase of 30% CG addition ratio, the release of K from the ash was inhibited by 11.24%, the release of Cl was promoted by 24.8%. The increase in CG addition ratio enhanced the conversion of water-soluble K and ammonium acetate-soluble K to hydrochloric acid-soluble K, KCl to HCl, fixed the alkali metal K in the ash and promoted the release of Cl. When the CG addition ratio was increased to 20%, the gas-phase K release rate decreased significantly, and the components of CG, such as Al2O3 and SiO2, reacted with KCl and KOH to form stable alumino-silicate compounds through the process of silicification-alumino-silicification. With the addition of CG, K was fixed in ash as a high melting point of silica-aluminates KAlSi3O8. After 800 degrees C, a large amount of K entered the gas phase as KCl (g), which was mitigated by increasing the CG addition ratio. A CG addition rate of 20%-30% can maximize the utilization benefit of CG, which was important for reducing slagging in biomass combustion.