Photoactive materials consisting of single-walled carbon nanotube (SWNT)–zinc oxide (ZnO) heterojunctions have received increasing attention because of their great potential in photocatalysis, photoresponse and photovoltaic effects. Here we have fabricated aligned ZnO nanorods on SWNT patterns by chemical vapor deposition without any catalyst. The presence of SWNT patterns can provide scaffolds to selectively grow ZnO nanorods because of electrostatic interaction and lattice match. The SWNT–ZnO heterojunctions demonstrated an asymmetric I–V curve with rectifying properties.