This application discloses an in-situ preparation method for a catalyst, comprising the following steps: gasifying a
nitrogen-containing substance and / or a
phosphorus-containing substance to obtain a
mixed gas, passing it into a reactor containing a support, and performing heat treatment I and heat treatment II to obtain the catalyst. This method enables the uniform introduction of
active components and additives, resulting in a uniform distribution of active sites in the prepared catalyst, which is beneficial for improving the catalyst's activity and selectivity. When used in the reaction of acetate and NH3, the catalyst can suppress side reactions and achieve high
acetonitrile selectivity. It avoids corrosiveness to reaction equipment, provides mild
reaction conditions, has high atom utilization, and is suitable for continuous, stable, and large-scale production.