Estimating groundwater quality parameters through conventional methods is time-consuming through laboratory measurements for megacities. There is a need to develop models that can help decision-makers make policies for sustainable groundwater reserves. The current study compared the efficiency of multivariate linear regressions (MLR) and artificial neural network (ANN) models in the prediction of groundwater parameters for total dissolved solids (TDS) for three sub-divisions in Lahore, Pakistan. The data for this study were collected every quarter of a year for six years. ANN was applied to investigate the feasibility of feedforward, backpropagation neural networks with three training functions T-BR (Bayesian regularization backpropagation), T-LM (Levenberg–Marquardt backpropagation), and T-SCG (scaled conjugate backpropagation). Two activation functions were used to analyze the performance of algorithmic training functions, i.e., Logsig and Tanh. Input parameters of pH, electrical conductivity (EC), calcium (Ca2+), magnesium (Mg2+), chloride (Cl−), and sulfate (SO42−) was used to predict TDS as an output parameter. The computed values of TDS by ANN and MLR were in close agreement with their respective measured values. Comparative analysis of ANN and MLR showed that TDS root means square error (RMSE) for city sub-division and Pearson’s coefficient of correlation (r) for ANN and MLR were 2.9% and 0.981 and 4.5% and 0.978, respectively. Similarly, for the Farrukhabad sub-division, RMSE and r for ANN were 4.9% and 0.952, while RMSE and r for MLR were 5.5% and 0.941, respectively. For the Shahadra sub-division, RMSE was 10.8%, r was 0.869 for ANN, RMSE was 11.3%, and r was 0.860 for MLR. The results exhibited that the ANN model showed less error in results than MLR. Therefore, ANN can be employed successfully as a groundwater quality prediction tool for TDS assessment.