In the photoreduction of CO2 to CO, the competitive H2 evolution is always inevitable due to the approximate reduction potentials of H+/H2 and CO2/CO, which results in poor selectivity for CO production. Herein, imidazolium-type ionic liquid- (IL-) modified rhenium bipyridine-based porous organometallic polymers (Re-POMP-IL) were designed as efficient and selective photocatalysts for visible-light CO2 photoreduction to CO based on the affinity of IL with CO2. Photoreduction studies demonstrated that CO2 photoreduction promoted by Re-POMP-IL functioning as the catalyst exhibits excellent CO selectivity up to 95.5% and generate 40.1 mmol CO/g of Re-POMP-IL1.0 (obtained by providing equivalent [(5,5′-divinyl-2,2′-bipyridine)Re(CO)3Cl] and 3-ethyl-1-vinyl-1H-imidazol-3-ium bromide) at 12 h, outperforming that attained with the corresponding Re-POMP analogue without IL, which highlights the crucial role of IL. Notably, CO2 adsorption, light harvesting, and transfer of photogenerated charges as key steps for CO2RR were studied by employing POMPs modified with different amounts of IL as photocatalysts, among which the CO2 affinity as an important factor for POMPs catalyzed CO2 reduction is revealed. Overall, this work provides a practical pathway to improve the CO2 photoreduction efficiency and CO selectivity by employing IL as a regulator.