Drug use is very detrimental to the physical and psychological health of users. Drug abuse also causes addiction and is a global epidemic. Therefore it is not surprising that scientific research related to drugs has attracted attention for research. However, many factors become obstacles in the medical services of the drug user, including cost, flexibility, and a slow process. Meanwhile, electronic systems can speed up handling time, improve work efficiency, save costs and reduce inspection errors. It means that a breakthrough is needed in developing a platform that can identify drug users. Therefore, this research aims to build machine learning with expertise like an expert who can diagnose drug users and distinguish the types of drugs used by drug users. The expert system on machine learning was developed using the Forward Chaining and Certainty Factor methods. This study concludes that the expert system on machine learning developed can be used to diagnose drug users and distinguish the types of drugs used with an accuracy of up to 80%. The implications of the expert system on machine learning are an alternative method for narcotics officers and medical doctors in diagnosing drug users and the types of drugs used.