Disclosed are a chimeric antigen receptor (CAR) targeting CLD18A2, and preparation method and use thereof. The extracellular binding region of the CAR comprises a protein specifically recognizing CLD18A2. The immune effector cell modified by the CAR can be used to treat tumors such as pancreatic cancer and stomach cancer.