The invention discloses a method for extracting pectin from orange peel and shaddock peel, which relates to the technical field of biochemical pharmacy. A technical scheme provided in the invention is as follows: the method for extracting pectin from orange peel and shaddock peel comprises the successive steps of cleaning leftovers of orange peel and shaddock peel, crushing the leftovers of orange peel and shaddock peel into particles with a particle size of 2 to 3 mm, treating the obtained particles with steam or boiling water for 5 to 8 min to passivate the activity of pectase, steeping the particles in clear water for 30 min, heating an obtained mixture to a temperature of 90 DEG C for 5 min, carrying out rinsing with clear water several times to remove bitter, pigments and soluble impurities, and after the above-mentioned pre-treatment, carrying out mixing and homogenizing, press filtration, ultrafiltration, nanofiltration I, nanofiltration II, stirring for pectin formation, press filtration, distillation and recycling, spray drying and crushing so as to prepare a pure product. Compared with the prior art, the invention has the following striking substantive advantages and remarkable progress: usage of traditional extraction methods and harmful organic solvents is reduced, original biological activity is retained during the process of extraction, the extraction process is simple and environment-friendly, and the method costs little and is applicable to large scale industrial production.