For the aromatization of olefins (in Fischer–Tropsch synthetic oil), especially for the fluidized bed reaction with steam as the fluidized medium, improving the catalytic and hydrothermal stabilities of ZSM-5 catalysts is a research focus because of both fundamental research interests and potential commercial applications. In this work, sequential alkali treatment and phosphorus modification were carried out for ZSM-5 samples. The results obtained from characterization and reaction evaluation show that the introduction of mesopores facilitates the dispersion of phosphorus species into the pores and improves the reaction stability for 1-octene aromatization. After the hydrothermal treatment, the P-0.5A-Z5-ST sample treated with an appropriate concentration of alkali retains the most acid sites and shows the highest aromatic selectivity (22.5%) at TOS = 660 min. Therefore, a moderate distribution of mesopores in a zeolite plays an important role in the diffusions of reactants and products, as well as in the distribution of phosphorus species.