A mathematical model is developed for the gas flow in a biomass-fired grate boiler with inner dust removal device, with the purpose to optimize the combustion condition. The distribution of gas flow is determined by the air flow ratio and the optimization is realized by the particular simulation. The optimal air flow is obtained by the analysis of various air flow ratios, via the comparison of flow characteristics and turbulence kinetic energy. The results of the numerical simulation show that the optimum air flow can help the sufficient the mixing and burnout of combustible in the furnace. It clearly indicates that the numerical simulation can be an effective tool for the practical guidance.