The use of the undercover buy technique in the investigation of narcotics crimes has obtained a legal basis in Law Number 35 of 2009 concerning Narcotics. However, the absence of detailed implementation arrangements regarding procedures, limits of authority, and the prohibition of entrapment has caused legal uncertainty and differences in interpretation among law enforcement officials. As a result, there is a disparity in court decisions, as seen in the Calang District Court Decision Number 18/Pid.Sus/2023/PN Cag which assesses the act of undercover buying as a form of investigator engineering even though elements of criminal acts have been proven. This study aims to explain and analyze the legal basis for the use of undercover buy investigation techniques by Indonesian Police Investigators in the Indonesian legal system as well as explain and examine the legal consequences arising from the application of undercover buy investigation techniques in narcotics crimes. This research is a normative juridical research with a legislative and conceptual approach. Data were analyzed qualitatively through the study of primary, secondary, and tertiary legal materials using legal interpretation techniques. The results of the study show that the Indonesian National Police Investigators are authorized to use the undercover buy technique based on the Narcotics Law and internal police policies. This authority is an attribution authority supported by police discretion, but it has not been supported by detailed implementation arrangements so that it has the potential to cause legal uncertainty. In addition, the use of undercover buy affects the validity of evidence in narcotics cases. If carried out according to procedures, the results can be used as valid evidence, while implementation that is not in accordance with procedures has the potential to cause procedural defects, invalidity of evidence, and human rights violations in the form of case engineering or entrapment. The suggestion of this study is the need for stricter regulation of undercover buying techniques through clear operational standards, limits of authority, and prevention of entrapment, accompanied by increased professionalism of investigators and internal supervision, and each implementation must be based on written orders to ensure legal certainty and the validity of evidence.