The invention provides a structural general formula (shown in the description) of a fluorescent probe for carbapenem type antibiotic bacteria. In the structural general formula, X represents carbon atoms or sulfur atoms; when the X represents CH, R1 represents methyl and can be of the configuration S or R, or the X represents CH2 or S; Y represents oxygen atoms, sulfur atoms or linkers on a fluorophorearomatic nucleus and comprises 4-hydroxymethylbenzyl or 4-hydroxyl or sulfydrylbenzyl or carbamate linkers. The synthesis method of the fluorescent probe comprises the following steps that 1, a compound 2 is prepared; 2, intermediates 3 and 4 are prepared; 3, a compound 5 is prepared; 4, a compound 6 is prepared; 5, a compound 7 is prepared; 6, a compound 8 is prepared; 7, a compound 9 is prepared; 8, a compound 10 is prepared;9, a compound CPC-1, namely a fluorescent probe compound is prepared. The fluorescent probe can be applied to detection of carbapenemases and drug-resistant bacteria containing the carbapenemases and has the important significance on antibiotic abandoning or few antibiotics adopted in medical treatment.