With the advancement of computing technology and big data technology, digital twins have gradually been applied in various fields, such as manufacturing, energy, and healthcare. This article studies the predictive control of nonlinear dynamic systems using digital twins. Based on a digital-twin control system framework, predictive control is discussed for three different nonlinear systems with time delays: 1) known nonlinear systems; 2) unknown nonlinear systems; and 3) unknown nonlinear cyber-physical systems. Both a digital-twin predictive control strategy and a digital-twin control predictor are proposed to compensate for time delays and communication delays actively. With the strategy and predictor, the digital-twin controller of a time-delay nonlinear system can be designed to achieve the desired performance based on the nonlinear system without time delays, which vastly simplifies the controller design procedure. A digital model is constructed using data to deal with unknown nonlinear dynamics. The three different closed-loop digital-twin predictive control systems are analyzed to derive a unified stability criterion. The simulation results show how the proposed digital-twin predictive control method performs well for nonlinear systems with time delays, unknown dynamics, and/or communication delays.