Geopolymer foams with different pore structures can be used in construction, water treatment, and heavy metal adsorption. The preparation of high porosity geopolymer foams using vegetable oil as a foam stabilizer is a feasible and cost-effective route. In this study, metakaolin-based geopolymer foams with hierarchical pore structures were fabricated by adding H2O2 as the foaming agent with palm olein as the foam stabilizer. The effects of H2O2 and palm olein content on the chemical features and pore structure of geopolymer foams were evaluated. Water absorption, thermal conductivity, and mechanical behaviors of geopolymer foams were also investigated. The results indicate that fatty acid salt surfactants were generated in situ in the geopolymer matrix due to the addition of palm olein. Geopolymer foams with H2O2 and palm olein addition possess a homogeneously concentrated macropore distribution. Palm olein exhibits a refining effect on intrinsic pores formed by geopolymerization. In addition, using appropriate amounts of palm olein and H2O2, geopolymer foams can achieve higher open porosity and better pore connectivity, resulting in the improvement of water absorption and thermal insulation capacity.