Self-assemblies of two newly designed pairs of hexylaniline derivatives connected with diynes (4J and 4JT2, 6J and 6JT2) at heptanoic acid/highly oriented pyrolytic graphite interface under ambient conditions have been studied by scanning tunneling microscopy. The functionalized π-conjugated molecules and solvent (heptanoic acid) were detected to co-assemble into different ordered networks. Density functional theory calculations were utilized to reveal the formation mechanisms of these nanoarrays and verify the synergism of van der Waals interactions and various hydrogen-bonding interactions in the self-assemblies.