The invention discloses an application of a carbocyanine dye near infrared fluorescent compound in the preparation of a photosencitizer used for treating tumors or abnormal hyperplasia tissues, shown in formula I or II, wherein X is selected from iodine, chlorine, bromine, alkyl sulfide (OSO2-alkyl), BF4 or ClO4; R1 is selected from chlorine or bromine; R2 is selected from hydrogen, alkyl, hydroxyl group (-OH), carboxyl (-COOH), aryl, aromatic alkyl, alkyl sulfonate, alkyl carbonate and alkyl amine; and n is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, l1 or 12.