Sol–gel method as a simple and low-cost approach is used to fabricate the heterostructures. Herein, Al-doped ZnO (AZO) thin films on p-Si subtrates are deposited via sol-gel method. AFM and SEM results reveal that the films have appreciably smooth surfaces. XRD results demonstrate that the films have highly oriented crystal structure, and the doping process is successfully performed. The analysis of I–V measurement characteristics unveils a nonideal diode behavior of AZO/Si heterojunctions. Considering the electrical properties, the device with AZO layer of 80 nm demonstrates a good rectifying behavior with rectification ratio of 926 at ± 4 V. The fabricated devices can be thought as diode for real applications. This investigation offers a paradigm for fabricating diodes from traditional semiconductor films.