The transmittance diminishment of solar cells, caused by dust accumulation is higher than 52.54% every year (2006 Energ. Convers. Manage. 47 3192), which greatly reduces their overall efficiencies of power conversion. Any other strategy for improving the photovoltaic device cannot compensate for this loss caused by the dust. However, this critical issue has not received much attention. In this work, a kind of self-cleaning coating consisting of ZnO nanowire-silicon pyramid hierarchical structures is proposed to overcome the dust accumulation on the photovoltaic device. The principle of designing this self-cleaning is based on the Cassie-Baxter theory. Both the micron size effect for superhydrophobicity and the performance of anti-reflection of light of the substrate should be retained, which are the requirements of application of solar cell. The pyramid-like silicon (named “silicon pyramid”, hereafter) is fabricated by simple chemical etching. The effects of isopropanol, KOH, etching time, and etching temperature on the morphology of the silicon pyramid are investigated by using systematic statistical design and analysis method, to obtain the best distribution and size of the silicon pyramid. In the systematic statistical design and analysis method, the pick-the-winner rule is adopted. Eventually, we find that the optimized conditions for etching silicon pyramid (according the requirements of self-clean) are as follows: etching time is 60 min, etching temperature is 95℃, and mixture is 80 mL DI water, 2.9598 g KOH and 20 mL isopropanol. Moreover, ZnO nanowire-silicon pyramid hierarchical structures for the application of photovoltaic device are successfully hydrothermally grown on the substrate of silicon pyramid for the first time. The obtained self-cleaning coating consists of ZnO nanowire (with a diameter of 136 nm) and silicon pyramid (with a size of 8-11 μm). The surface of this coating possesses superhydrophobic properties, i.e., a water contact angle of 154° and a contact angle hysteresis of less than 10°, after being modified by heptadecafluorodecyltrimethoxysilane. Also, our obtained ZnO nanowire-silicon pyramid hierarchical structures have quite a good performance of anti-reflection, which appear gray in the normal environment. And the mechanism for it is postulated. Importantly, some new phenomena, such as “high temperature” improving the growth of silicon pyramid, are also revealed. Besides, the physical mechanism for “high temperature” improving the growth of silicon pyramid and anisotropic etching of silicon substrate is discussed. It is indicated that the anisotropic behavior is attributed to small difference in energy level (being a function of the crystal orientation) between the back-bond surface states. The method we proposed to achieve self-cleaning coating is versatile, reliable and low-cost, which is also compatible with contemporary micro-and nano-fabrication processes.