The invention provides a detergent and a preparation method thereof. The detergent is prepared through the following raw materials in parts by weight: 2-10 parts of a cactus extract, 10-30 parts of coconut oil monoethanolamide, 20-40 parts of gleditsioside, 5-18 parts of decyl polyglucoside propylene glycol, 1-5 parts of a soapberry extract, 6-18 parts of a citrus extract, 2-6 parts of a scallop powder, 8-17 parts of oleuropein, 10-17 parts of a lemon enzyme extract, and 20-100 parts of water. Compared with the prior art, the method has the advantages that the cactus extract, the coconut oil monoethanolamide, the gleditsioside, the decyl polyglucoside propylene glycol, the soapberry extract, the citrus extract, the scallop powder, the oleuropein and the lemon enzyme extract are used as theraw materials and mutually act and interplay, therefore, the deterging capacity of the prepared detergent is improved, and oil stains in a kitchen can be removed.