Linear conjugated polymer photocatalysts remain suffer from insufficient near-infrared light absorption and poor photogenerated-carriers separation efficiency caused by twisted backbone, limiting their further application for photocatalytic water splitting to produce hydrogen energy. Herein, we first synthesized crystallized 2D poly(thiophene-co-nitrothiophene) (PN) with narrow band gap through direct (hetero) arylation polymerization (DHAP) method, then constructed dimension-matching PN/graphitic carbon nitride (CN) heterojunctions (PN/CN) with 2D/2D structure for visible/near-infrared light photocatalytic hydrogen production. The resulting 2D/2D heterojunctions exhibit excellent visible/near-infrared light absorption and photocatalytic activates. The ratio-optimized 15PN/CN shows boosting hydrogen production activity up to 11.73 mmol/hg−1 under visible/near-infrared light (λ > 420 nm) irradiation, which is ∼ 30-time and ∼ 46.9-time improvement than that of PN and CN separately. Notably, the apparent quantum yield (AQY) of 15PN/CN is calculated to be 2.35 % at 700 nm and 0.62 % at 800 nm. It is proved that the π − π interaction of dimension-matching heterojunctions between PN and CN facilitates electrons transfer from LUMO of PN to LUMO of CN. This study provides another new train of thought for reasonably developing dimension-matching polymer heterojunctions by manipulating crystallinity and band structure of linear conjugated polymers for efficient visible/near-infrared light photocatalytic hydrogen production.