The invention relates to a preparation method for a double-functional Beta-FeOOH/eg-C3N4 composite nanomaterial. The method comprises the following steps: using water as a solvent, adding a suitable amount of eg-C3N4, adjusting a solution pH, and adding a suitable amount of ferric salt, performing ultrasonic-processing, washing, and drying, to obtain the Beta-FeOOH/eg-C3N4 composite nanomaterial.The advantage of the method is that operation is simple and easy, a reaction condition is moderate, other chemical reagents and solvents except a raw material are prevented from being used in a wholeprocess, no by-product is generated, synchronization of combination and nano-crystalline growth is realized, cost is low, and the process environmentally friendly, and a requirement for industrializedapplication can be satisfied. A Beta-FeOOH/eg-C3N4 nano rod-like compound catalyst prepared by the method disclosed by the invention has performance of photocatalytic-degrading a pollutant in visiblelight, and capacity of generating hydrogen by electrocatalytically decomposing water.