N-heteroquinones with both quinone and pyrazine as electron-withdrawing moieties can be potential candidates for n-type organic semiconductor materials. Here, two novel soluble N-heteroquinones: 5,9,14,18-tetra-((triisopropylsilyl)ethynyl)-6,8,15,17-tetraazaheptacene-7,16-dione (TAHD) and 6,10,17,21-tetra-((triisopropylsilyl)ethynyl)-7,9,18,20-tetraazanonacene-8,19-dione (TAND) with different lengths have been synthesized and their structures were fully characterized by 1H NMR, 13C NMR, HRMS and single crystal analysis. Our studies showed that the shorter TAHD molecules are planar in the solid state without intermolecular π-π stacking and the main force to stabilize the packing is the C-H-π interaction between (triisopropylsilyl)ethynyl (TIPS) groups and the backbones. Differently, the larger TAND molecules show slightly twisted structures with the anthracene units bent down and up on the two sites and the dihedral angle between the quinone unit and the anthracene unit is 6.7°. Meanwhile, TAND molecules adopt face-to-face two-dimensional (2D) brickwork arrangement, and the distances between π planes are 3.63 and 3.38 nm, respectively, suggesting the existence of π-π interactions. The visible-light-driven photoelectrochemical behaviors showed that both TAHD and TAND are n-type semiconductors. However, TAHD shows unstable photovoltage response and lower photocurrent due to the absence of π-π interaction while TAND shows stable photovoltage response and a relatively high photocurrent. Our results suggested that the length of the linear N-heteroquinones has large effects on their physical properties, crystal packing and photoelectrochemical behaviors. © The Royal Society of Chemistry.