The intelligent prediction of surrounding rock deformation is of great significance for guiding the design and construction of tunnel projects in coastal areas. The deformation of tunnels in coastal areas is more complex than that of the ground, and the risk of encountering adverse geological conditions is greater. The traditional tunnel deformation prediction method contains the defects of a fixed model, a limited sample number, and it is easy to fall into underfitting and local overfitting. Therefore, the capacity of previous methods is limited by significant error, weak generalization, and poor intelligence. This paper proposes an adequate fitting prediction method for tunnel deformation based on the effective rank theory of the hidden layer nodes’ output matrix to analyze the surrounding rock and predict its deformation intelligently. Based on the traditional BPNN (back propagation neural network) algorithm, the number of hidden layer nodes is determined by the effective rank of the output matrix. Then, the approximation error and degree were adopted to reflect the approximation law of the BPNN to achieve the purpose of overfitting and underfitting control. An optimized BP neural network model for intelligently predicting tunnel deformation is constructed. Then, the optimized BPNN model is applied to a case study of a coastal tunnel in South China. Compared with the prediction method of LR (linear regression) and TS (time series), the results show that the prediction results of the optimized model are in good agreement with the measured values, with strong generalization ability and high intelligence. The proposed method is of guidance to other tunnels surrounding rock deformation prediction and engineering practice.