The invention discloses a method for extracting total flavonoids from psidium guajava leaves. The method is characterized by comprising the steps of putting the psidium guajava leaves in an aqueous solution of a surfactant, carrying out extraction under the assistance of microwaves and ultrasonics, and then, carrying out solid-liquid separation, thereby obtaining an extract containing the total flavonoids, wherein the mass percent of the surfactant in the aqueous solution of the surfactant is 1% to 3%, the microwave power is 100W to 150W, and the ultrasonic power is 600W to 650W. According the method, an organic solvent is replaced with an aqueous solution, and the wetting and solubilization actions of the surfactant, a bulk-heating principle of microwave extraction and an cavitation effect of the ultrasonics are fully combined, so that the traditional problem, i.e., organic solvent residue is solved, meanwhile, the extraction time can be greatly shortened, the extraction ratio is increased, the production cost of enterprises is reduced, and the method has a broad popularization prospect.