The applications of three-dimensional materials combined with two-dimensional materials are attractive for constructing high-performance electronic and photoelectronic devices because of their remarkable electronic and optical properties. However, traditional preparation methods usually involve mechanical transfer, which has a complicated process and cannot avoid contamination. In this work, chemical vapor deposition was proposed to vertically synthesize self-assembly oriented hexagonal boron nitride on gallium nitride directly. The material composition, crystalline quality and orientation were investigated using multiple characterization methods. Thermal conductivity was found to be enhanced twofold in the h-BN incorporated sample by using the optothermal Raman technique. A vertical-ordered (VO)h-BN/GaN heterojunction photodetector was produced based on the synthesis. The photodetector exhibited a high ultraviolet photoresponsivity of up to 1970.7 mA/W, and detectivity up to 2.6 × 1013Jones, and was stable in harsh high temperature conditions. Our work provides a new synthesis method to prepare h-BN on GaN-based materials directly, and a novel vertically oriented structure of VO-h-BN/GaN heterojunction, which has great application potential in optoelectronic devices.