Membrane technology has become a crucial solution for treating produced water, playing a vital role in resource recovery and environmental preservation. The use of advanced Artificial Intelligence (AI) technique such as Machine Learning (ML) has introduced an innovative approach to define and model these treatment procedures such as trans-membrane pressure (TMP) and total membrane resistance. The research focuses specifically on the utilization of Artificial Neural Network (ANN) and Extreme Gradient Boosting (XGBoost) model to improve the precision and effectiveness of produced water treatment using membrane technology. Also, the study presented explores how the Artificial Neural Network (ANN) framework excels in predictive insights and process modeling, optimizing operational parameters in membrane-based treatment setups. Furthermore, integrating the Extreme Gradient Boosting (XGBoost) model highlights its ability to enhance system performance, providing accurate predictions and better control in complex treatment processes. It presents comprehensive research of combining Artificial Neural Network (ANN) and Extreme Gradient Boosting (XGBoost) model with membrane technology for produced water treatment, emphasizing their potential to improve optimization techniques and modeling approaches, ultimately enhancing water treatment efficiency and sustainability. Both the Artificial Neural Network (ANN) and Extreme Gradient Boosting (XGBoost) models achieved an impressive R-squared (R2) scores of 0.754, and 0.97 for Transmembrane Pressure (TMP), and 0.95 and 0.81 for Total Resistance prediction respectively.