Covalent organic frameworks with tunable optical bandgaps and notable piezoelectricity enable sustainable piezo-photocatalytic production of H2 and H2O2 via pure water splitting. Strong dipole moments can significantly boost piezoelectric properties, necessitating a systematic exploration of their structure-property relationships. Here, we synthesize a series of β-ketoenamine/imine-linked covalent organic frameworks, such as TP-BT-0F/1F/2F-COF, BTA-BT-0F-COF, and TP-SB-COF, through molecular design engineering. The combination of symmetry-breaking benzothiadiazole units and in-plane polarized β-ketoenamine linkages creates a robust dipole moment in TP-BT-0F-COF. This material demonstrates a high piezoelectric coefficient and bandgap narrowing, achieving H2 and H2O2 production rates of 1501.4 and 1435.8 μmol g-1 h-1 under co-exposure to ultrasound (60 W, 40 kHz) and visible light. Density functional theory identifies N8 and C6 sites on benzothiadiazole units as potential catalytic sites for H2 and H2O2 evolution, respectively. Molecular design of covalent organic frameworks with prominent dipole moments advances mechano-optical energy conversion technologies.