Estimating the rate of penetration (ROP) is one of most critical tasks for evaluating the efficiency and profitability of drilling operation, which will aim in decision-making related to well planning, time estimation, cost estimation, bit selection, operational troubles, and logistics in drilling operation. The rise in unconventional resource development underscores the need for accurate ROP prediction to optimize drilling operations in these valuable reserves. ROP prediction and optimization in unconventional hydrocarbon reservoirs are challenging due to the formations' heterogeneity, high strength, and brittleness. These reservoirs often involve complex well designs, high pressures, and high temperatures, making it difficult to maintain optimal drilling conditions. This study presents the optimization and validation of the artificial neural network (ANN) model to predict the ROP during horizontal drilling through unconventional hydrocarbon reservoirs. The ANN model was trained using 34,869 data points from five wells (Well-1 to Well-5) and achieved a high correlation coefficient of 0.96 and an average absolute percentage error (AAPE) of 4.68%. An empirical correlation was developed based on the weights and biases of the optimized ANN model. The empirical correlation performance was rigorously tested with 23,246 data points, representing 40% of the data from the same wells, yielding an AAPE of 4.75% and a correlation coefficient of 0.96. Validation of the developed equation on data from Well-6 further confirmed the model's robustness, maintaining a correlation coefficient of 0.91 and an AAPE of 5.75%. These results demonstrate the ANN model's and empirical equation's accuracy and reliability in predicting the ROP, highlighting their potential to optimize drilling operations in unconventional hydrocarbon reservoirs.