Incorporating phosphorus (P) into the active metals of a catalyst is an effective strategy to enhance the catalytic performance. However, the mechanisms underlying the influence of the introduced phosphorus species on catalytic performance remain largely unknown. Herein, we observe a pronounced shift in the product selectivity of the CO2 hydrogenation from CH4 to CO upon introducing P into the Ru/SiO2 catalysts. This alteration in product selectivity is attributed to the role of introduced P as a "fence" hindering the migration of active H species. The adsorbed CO, a key intermediate species for CO2 methanation, is preferentially desorbed before H species cross the "fence" for further hydrogenation, thereby weakening the H2-assisted CO activation process and consequently inhibiting CH4 generation. Our findings provide in-depth insights into the origin of phosphorization-induced modulation of product selectivity in CO2 hydrogenation. Furthermore, the concept of phosphorization-induced "fence effect" opens a promising avenue for catalyst design in various industrial hydrogenation processes.