Two shape-selective HZSM-5 catalysts with similar pore size were prepared by silicalite-1 coating or boron modification, respectively. These catalysts samples were characterized by XRD, SEM, NH3-TPD, Py-IR and N2 adsorption–desorption isotherms and tested in the alkylation reaction of toluene with methanol. The results indicated that the boron modification weakened the acidity but increased the total amount of acidity sites, while the silicalite-1 coating led to the decrease of the strong acidity and total acidity. Due to the specific shape-selectivity that the micropore architecture afforded and the increment of the weak acid percentage, both catalysts exhibited a high p-xylene selectivity over 98%. Moreover, the higher toluene conversion would be retained once the strong acid sites in the micropores were remained as many as possible under the premise of the shape-selectivity of pore size.