The invention discloses a preparation method of an all-organic composite photocatalytic material for photocatalytic production of hydrogen peroxide, and the preparation method specifically comprises the following steps: firstly, calcining a nitrogen-containing precursor in a muffle furnace, and grinding to obtain g-C3N4; the preparation method comprises the following steps: uniformly mixing g-C3N4 with 1, 6, 7, 12,-tetrachloro-3, 5, 9, 10-perylenetetracarboxylic dianhydride, calcining and grinding in an inert gas atmosphere, cleaning the obtained sample with methanol and deionized water until the supernatant is colorless, centrifuging, drying and grinding. According to the all-organic composite photocatalytic material prepared by the invention, an all-organic heterojunction is formed between 1, 6, 7, 12,-tetrachloro-3, 5, 9, 10-perylene tetracarboxylic diimine and g-C3N4, and chlorine atoms are substituted at the bay position of perylene tetracarboxylic diimine, so that electron migration in carbon nitride is promoted, separation of current carriers is facilitated, the recombination rate of electron-hole pairs is reduced, and the photocatalytic efficiency is improved. The photocatalytic hydrogen peroxide production capability is improved.