The efficiency of hylocereus polyrhizus based Dye-Sensitized Solar Cell (DSSC) has been improved by the ZnO thin-film that was used as a working electrode for DSSC. The ZnO thin-film was improved by varying the post-heating time during the annealing process which was synthesized by a sol-gel spin coating method. The preparation of dye solution was conducted by cutting the hylocereus polyrhizus into small pieces and put into a beaker glass. The hylocereus polyrhizus then was crushed with a mortar until it was soft. In order to obtain the extracted ethanol was added and leaf for 24 hours in a dark room. The extract then was filtered by using filtered paper and put into a container that wrapped an aluminum foil and kept in place to avoid the extract from sun rays. The dye sample is then UV-Vis tested to find the highest absorbance value and wavelength of the sample. The extract solution was used to form the ZnO/dye solar cell where the ZnO thin film dipped into natural dyes solution with the ZnO thin films facing up for 24 hours to let the dye adsorbed by the ZnO thin film. The ZnO thin film was dipped into extract hylocereus polyrhizus function as a working electrode and put together with a platinum counter electrode that separated by Surilyn. The pasting with Surilyn was conducted by pushing the working electrode and counter electrode and heated on a hot plate of the temperature of 70-80oC to perfectly put together. The working electrode which was put together to the platinum counter electrode was injected with liquid electrolytes through a small hole on the platinum counter electrode. Electrical testing is carried out after the DSSC has been assembled by making an electrical circuit between the DSSC with a measuring instrument. The sensitizer value of the hylocereus polyrhizus was 0.652 au, at the wavelength of 538 nm. The maximum power of the DSSC was 0.10030 w/cm2 and the efficiency of 0.0274%.