Metal-organic framework (MOF)--based composites have received significant attention in a variety of applications, including pollutant adsorption processes. The current investigation was designed to model, forecast, and optimize heavy metal (Cu2+) removal from wastewater using a MOF nanocomposite. This work has been modeled by response surface methodology (RSM) and artificial neural network (ANN) algorithms. In addition, the optimization of the mentioned factors has been performed through the RSM method to find the optimal conditions. The findings show that RSM and ANN can accurately forecast the adsorption process's the Cu2+ removal efficiency (RE). The maximum values of RE are achieved at the highest value of time (150 min), the highest value of adsorbent dosage (0.008 g), and the highest value of pH (=6). The R2 values obtained were 0.9995, 0.9992, and 0.9996 for ANN modeling of adsorption capacity based on different adsorbent dosages, Cu2+ solution pHs, and different ion concentrations, respectively. The ANN demonstrated a high level of accuracy in predicting the local minima of the graph. In addition, the RSM optimization results showed that the optimum mode for RE occurred at an adsorbent dosage value of 0.007 g and a time value of 144.229 min.