The stator flux linkages serve as a key to the optimal control of synchronous machines (SMs). However, due to their complex and nonlinear characteristics, accurately modeling and identifying them online remains highly challenging. In this regard, neural network-based learning strategies are considered promising candidates for modeling the flux linkages, but their application has so far been largely limited to offline training of neural networks. Therefore, this study presents a physics-informed online learning method for accurately modeling the flux linkages of SMs. The proposed method enables online training of a neural network to learn the physical laws governing the flux linkages while adhering to the model’s inherent physical constraints. The learning rules for updating the neural network weights are formulated to satisfy the first-order optimality conditions, and the proposed method can be employed as an online flux linkage estimator. The effectiveness of the proposed method is validated through simulation results conducted on a 35 kW interior permanent magnet synchronous machine (IPMSM) drive.