The invention discloses a cleaning agent suitable for cleaning hollow fiber nanofiltration membranes and a preparation method thereof. The cleaning agent is prepared from, by mass, 0-4% of citric acid, 0-60% of hydrochloric acid, 0-0.5% of oxalic acid, 0-4% of sodium tripolyphosphate, 0-20% of sodium carbonate, 0-0.3% of sodium hydroxide, 0-2% of trisodium phosphate, 0-4% of sodium sulfate, 0-5% of sodium hydrogen sulfite, 0-10% of ethylenediaminetetraacetic acid, 0-0.1% of alkyl sodium sulfonate, 0-0.3% of sodium dodecyl benzene sulfonate, 0-0.3% of sodium dodecyl sulfate and the balance water, wherein the mass percentage of water is not larger than 98%. All the components are sequentially added in proportion to a stirring enamel reactor and stirred and mixed to be uniform at room temperature. The cleaning agent is easy to prepare, high in decontamination pertinence, efficient, low in cleaning cost and especially suitable for cleaning away calcium carbonate scale, calcium sulfate scale, strontium sulfate scale, barium sulfate scale, metal oxide and metal hydroxide of the hollow fiber nanofiltration membranes and cleaning colloid contaminated and biologically contaminated nanofiltration membranes.