AbstractWater transport in the unsaturated zone is an important part of the hydrological cycle and is the link between the atmosphere‒soil‐groundwater for material and energy transport. The accurate prediction of soil moisture (SM) is essential for the rational exploitation of water resources. Data‐driven deep learning methods are widely used in many fields; however, the lack of physical mechanisms limits their application in hydrological fields, especially for SM prediction in unsaturated zones. To solve this problem, this study proposes a new deep learning method that introduces the water balance principle, Richard's equation, and SM boundary conditions as constraints to construct the new loss function that guides the training process of deep learning, called physics‐informed deep learning (PIDL). In tests consisting of a large number of data sets acquired from in situ observation sites in the field, PIDL exhibits higher accuracy than ordinary deep learning (long short‐term memory) and physical models, with 51.03% and 53.46% reduction in root mean square error of SM prediction, respectively. PIDL performance significantly improved in predicting scenarios that are difficult for ordinary deep learning to handle, such as sparse data sets, extreme values, and mutated values. In addition, PIDL maintains high accuracy over a longer prediction period. The addition of physical mechanisms allows deep learning to mine patterns not only from the data itself but also from a priori physical theoretical knowledge for guidance, and this hybrid modeling approach can also be generalized to prediction problems in other hydrological domains.