Dihexyl-heterocoerdianthrone (DHHCD), a new kind of heterocoerdianthrone derivatives, was synthesized. DHHCD could interact with single-walled carbon nanotubes (SWNTs) through a π-π stacking interaction. Then, the dispersion and aggregation state of SWNTs dispersed by DHHCD was explored. It showed that this dispersant has no apparent chiral selectivity for SWNTs. However, the purity was improved after dispersion. UV–vis-NIR spectra, SEM and AFM measurements showed that DHHCD has a high ability to disperse the small bundles of SWNT, contributing to their ability to isolate well in solution and film. In addition, by the photochemical reaction, DHHCD adsorbed on the surface of the nanotubes can be removed by light irradiation and washing by solvent. It was shown by that the electrical conductivity of SWNTs films has a relation with the excess dispersant. The conductivity of the film was improved after removing the photo-reactive dispersant. Accordingly, DHHCD can act as a photo-functional dispersant of SWNTs to make the SWNT thin film with homogeneous distributing of small bundles.