[Objective] The water hammer pressure in pipeline systems is a key factor that endangers the safe and stable operation of the system. Especially for the viscoelastic pipes, their time-dependent mechanical behavior makes the analysis and calculation of water hammer pressure more complicated. This study aims to 1) explore the direct water hammer pressure response characteristics of viscoelastic pipes under rapid valve closing by combining experiment and theory, 2) modify the existing theoretical calculation model, and introduce an intelligent algorithm to predict the pressure, and 3) finally to establish a more accurate and practical calculation method for water hammer pressure in viscoelastic pipes. [Methods] The classical Joukowsky formula for direct water hammer pressure was modified and the creep compliance function of pipeline was introduced to derive the direct water hammer pressure calculation formula suitable for viscoelastic pipelines. The formula was then modified by using experimental data. Based on the modified pressure rise formula, the nonlinear fitting function of a backpropagation (BP) neural network was used to predict the direct water hammer pressure rise value of the same type of pipe with the valve closing time, initial flow rate and pipeline material parameters as input features and the peak value of water hammer pressure as the output target, and an intelligent prediction model of direct water hammer pressure in viscoelastic pipeline was established. [Results] In viscoelastic pipes, the shorter the valve closing time, the greater the water hammer pressure value. The delayed strain of viscoelastic material was introduced into the viscoelastic calculation formula. The mechanical response of the pipe wall included two parts: instantaneous elastic strain and delayed strain, resulting in a higher peak value of water hammer pressure, which made the calculated value of the viscoelastic water hammer pressure formula higher than that of the classical water hammer pressure formula. The calculation results showed that the classical elastic theory was no longer suitable for the calculation of direct water hammer pressure in viscoelastic pipelines. The comparison showed that the maximum error between the calculated value and the measured value of the modified formula was small under all test conditions, indicating that the proposed modified formula could better characterize the direct water hammer pressure in viscoelastic pipeline. In the BP neural network prediction model, the prediction results were compared with the calculation results of the modified viscoelastic pipe direct water hammer pressure calculation formula, and it was found that the error between the two was kept in the range of 1% to 4%. [Conclusion] In the water hammer test of PMMA pipeline, the deviation between the calculation results of classical viscoelastic water hammer pressure rise formula and the measured values is large, with a maximum deviation of 15.1%. Based on the viscoelastic theory derivation and experimental data fitting, a modified direct water hammer pressure calculation formula is proposed, which effectively characterizes the influence of pipe viscoelasticity and valve operation rate on the pressure peak. Verification shows that the maximum error of the calculation is only 3.3%, which is significantly better than the classical elastic theory. Furthermore, a hybrid prediction method combining theoretical model and BP neural network is constructed in this study. The theoretical formula is embedded in the network structure, and the prediction error of pressure peak is controlled within 0.1 m under various flow velocity conditions, showing good accuracy, reliability, and adaptability to working conditions. This provides a feasible reference method for pressure prediction and water hammer risk assessment in engineering practice.