Accurate forecasting of the lifetime and degradation mechanisms of lithium-ion batteries is crucial for their optimization, management, and safety while preventing latent failures. However, the typical state estimations are challenging due to complex and dynamic cell parameters and wide variations in usage conditions. Physics-based models need a tradeoff between accuracy and complexity due to vast parameter requirements, while machine-learning models require large training datasets and may fail when generalized to unseen scenarios. To address this issue, this paper aims to integrate the physics-based battery model and the machine learning model to leverage their respective strengths. This is achieved by applying the deep learning framework called physics-informed neural networks (PINN) to electrochemical battery modeling. The state of charge and state of health of lithium-ion cells are predicted by integrating the partial differential equation of Fick’s law of diffusion from a single particle model into the neural network training process. The results indicate that PINN can estimate the state of charge with a root mean square error in the range of 0.014% to 0.2%, while the state of health has a range of 1.1% to 2.3%, even with limited training data. Compared to conventional approaches, PINN is less complex while still incorporating the laws of physics into the training process, resulting in adequate predictions, even for unseen situations.