The enormous internet development now day across all aspects of human life has introduced various hidden risk of malicious attacks on network security that most users didn't realize. One of the malicious attacks is intrusion of system that proliferate user's account effortlessly. Hence, in order to avoid intrusion effect that lead to financial loss and any other loss, intrusion detection system is needed to identify a dynamic pattern of cyber attacks. In this paper, we propose an Optimized XGBoost Classifier model with the help of Optuna Hypertuning method to find the best parameter for the model. In order to find the most efficient method for training, we assign three Optuna scenarios combine with feature selection to learn the data and the machine learning model. Through learning, Optuna generated the best parameter for XGBoost Classifier. Optuna avoids time consuming and low efficiency training model. The propose XGBoost Classifier model with Optuna Hypertuning method results in a greater accuracy of detection intrusion compare to any other models.