The deposition of undoped and iodine (I 2 )-doped polyaniline (PANI) on TiO 2 thin film was carried out using plasma-enhanced chemical vapor deposition (PECVD) under different power inputs for the fabrication of p-polyaniline/n-TiO 2 heterostructure devices. The increment in the size of TiO 2 nanoparticles was observed after I 2 doping by PECVD. The crystalline properties were altered upon I 2 doping, suggesting a subtractive interaction between PANI and I 2 moieties during PECVD. The significant changes in the structural and optical properties confirmed the I 2 doping of PANI with strong bonding to the TiO 2 nanomaterials. The existence of hydrogen bonding between the imine (-NH) of PANI and the hydroxyl (-OH) group of TiO 2 nanomaterials was investigated by X-ray photoelectron spectroscopy characterization. A device fabricated by PANI/TiO 2 or I 2 -PANI/TiO 2 thin film with a top platinum (Pt) layer exhibited nonlinear behavior of current (I)-voltage (V) curve, i.e., moderate diode behavior. Compared to the Pt/PANI/TiO 2 heterostructure device, the Pt/I 2 -PANI/TiO 2 heterostructure device showed improved I-V properties with a considerably higher current of 0.050 mA, which might be attributed to the I 2 doping-induced generation of large numbers of polarons in the PANI bandgap.