The invention relates to the technical field of photoelectric materials, in particular to an anti-reflecting heterojunction composite coating and a preparation method thereof. Firstly, the anisotropy of alkali liquor is used for etching monocrystalline silicon, and a conical structure in micron size is obtained; then, by a soft template printing technology, the silicon cone structure is transferred to the surface of a rigid base, wherein the surface of the rigid base is attached to a transition metal oxide, and a conical transition metal oxide is obtained; finally, by an in-situ oxide method, conductive macromolecule nano particles grow on the surface of the conical transition metal oxide, and a transition metal oxide and conductive macromolecule composite coating using the rigid base as a carrier is formed. The composite coating has the micro-nano multistage structure, so that excellent anti-reflecting performance is realized; meanwhile, a p-n heterojunction is formed at a transition metal oxide and conductive macromolecule assembly boundary surface; the efficient photogenerated charge separation capability is given to the composite coating; the photoelectric converting efficiency is improved. The composite coating effectively utilizes incident light, and has high application prospects as a photoelectric material.