This work introduces an online learning-based model predictive control (MPC) approach for the modeling and control of switched nonlinear systems with scheduled mode transitions. Initially, recurrent neural network (RNN) models are constructed offline, utilizing sufficient historical operational data to capture the nominal system dynamics for each mode. Subsequently, we employ real-time process data to develop online learning RNN models, aiming to approximate the dynamics of switched nonlinear systems in the presence of of bounded disturbances. In cases where the initial RNN model is unavailable for a specific switching mode due to very limited historical data, we use real-time data from closed-loop operations under a proportional–integral (PI) controller to build online learning RNN models. To evaluate the predictive performance of online learning RNNs, a theoretical analysis on their generalization error bound is developed using statistical machine learning theory. Additionally, considering the presence or absence of initial RNN models, two MPC schemes are developed. These schemes employ RNNs as prediction models to stabilize switched nonlinear systems, ensuring closed-loop stability by accounting for the generalization error bound derived for online learning RNNs. Finally, the effectiveness of the proposed MPC schemes is demonstrated through a nonlinear process example with two switching modes.