Porous organic polymers (POPs) are a type of porous material composed of organic structural units connected by covalent bonds and POPs have been used as efficient electrocatalysts for hydrogen evolution reaction (HER). Herein, glassy carbon electrode (GCE) is chemically modified by B‐doped imidazolium‐based porous organic polymers loaded with Ru nanoparticles on the GCE surface. The incorporation of B in the POPs regulates the electronic structure of electrocatalysts to enhance their inherent electrocatalytic activity for HER. The optimized modified electrode GCE‐Ru/PIM‐Br2 exhibits a low overpotential of 271 mV at a current density of 10 mA cm‐2 with a small Tafel slope (80 mV dec‐1) in acidic solutions, and shows long‐term stability for up to 22 h. This work presents a strategy to develop B‐doped porous electrodes with loaded metal nanoparticles to strengthen the catalytic performance of electrocatalysts.