Organic heterojunction is indispensable in organic electronic devices, such as organic solar cells, organic light-emitting diodes and so on. Fabrication of core–shell nanostructure provides a feasible and novel way to prepare organic heterojunction, which is beneficial for miniaturization and integration of organic electronic devices. Fabrication of nanotubes which constitute the core–shell structure in large quantity is the key for the realization of application. In this work, a simple and convenient method to prepare nanotubes using conjugated copolymer of perylene diimide and dithienothiophene (P(PDI-DTT)) was demonstrated. The relationship between preparation conditions (solvent atmosphere, solution concentration and pore diameter of templates) and morphology of nanostructure was studied systematically. P(PDI-DTT) nanotubes could be fabricated in regular shape and large quantity by preparing the solution with appropriate concentration and placing anodic aluminium oxide template with nanopore diameter of 200 nm in the solvent atmosphere. The tubular structure was confirmed by scanning electron microscopy. P(PDI-DTT) nanotubes exhibited electron mobility of 0.02 cm2 V–1 s–1 in field-effect transistors under ambient condition. Light-emitting nanostructures were successfully fabricated by incorporating tetraphenylethylene into polymer nanotubes.