In this work, we successfully assembled an organic–inorganic core–shell hybrid p-n heterojunction ultraviolet photodetector by the electropolymerization deposition of poly(3,4-ethylenedioxyselenophene) (PEDOS) on the surface of zinc oxide nanoarrays (ZnO NRs). The structures of composite were confirmed by FTIR, UV–Vis, XRD and XPS. Mott–Schottky analysis was used to study the p-n heterojunction structure. The photodetection properties of ZnO NRs/PEDOS heterojunction ultraviolet photodetector were systematically investigated current–voltage (I–V) and current–time (I–t) analysis under different bias voltages. The results showed that PEDOS films uniformly grew on ZnO NRs surface and core–shell structure was formed. The p-n heterojunction structure was formed with strong built-in electric field between ZnO NRs and PEDOS. Under the irradiation of UV light, the device showed a good rectification behavior. The responsivity, detection rate and the external quantum efficiency of the ultraviolet photodetector reached to 247.7 A/W, 3.41 × 1012 Jones and 84,000% at 2 V bias, respectively. The rise time (τr) and fall time (τf) of ZnO NRs/PEDOS UV photodetector were obviously shortened compared to ZnO UV photodetector. The results show that the introduction of PEDOS effectively improves the performance of the UV photodetector.