The invention discloses a monomer N-(p-acetenyl)-phenyl-2-X-tetrafluorobenzamide (X=F, Cl, Br and I) for identifying halogen anions, a polymer, and a method for preparing the monomer and the polymer. The method comprises the following steps: by taking 4-ethynylaniline and hexafluorobenzoic acid as main initial raw materials, taking N,N-dimethyl-4-aminopyridine as a catalyst, finally synthesizing a target small molecule compound N-(p-acetenyl)-phenyl-2-X-tetrafluorobenzamide; and by taking a precious metal complex Rh+(2,5-nbd)[(eta6-C6H5)B-(C6H5)3] (triphenyl-eta6-phenylboron-2,5-norborneol diene rhodium, Rh(nbd)BPh4) as a catalyst, thereby obtaining the poly-N-(p-acetenyl)-phenyl-2-X-tetrafluorobenzamide by virtue of a coordination polymer orientation method. The obtained small molecule monomer and polymer molecular structures simultaneously contain hydrogen bond donors and halogen bond donors, and the monomer and polymer can identify the halogen anions by virtue of coordination of hydrogen bonds and halogen bonds. Meanwhile, the preparation method has the advantages of the reaction conditions are mild, the reaction process is simple, the method is easy to control, the yield of the obtained product is high and the like.