This article addresses the design and real-time implementation of an expert model predictive controller (Expert MPC) for the control of the brackish and seawater desalination process in a pilot-scale reverse osmosis (RO) plant. This pilot-scale plant is used in order to obtain the optimal operation conditions of the RO desalination process through the implementation of different control strategies, as well as in the training of operators in the new control and management technologies. A dynamical mathematical model of this plant has been developed based on the available field data and system identification procedures. Predictions of the obtained model were in good agreement with the available field data. The designed Expert MPC is distinguished by having a plant identification block and an expert system. The expert system, using a rule-based approach and the evolution of the plant variables, can modify the plant identification block, the plant prediction model, and/or the optimizer in order to improve the performance, robustness and operational safety of the overall control system. The real-time comparison results of the designed Expert MPC and a well-designed model predictive controller (MPC) show that the proposed Expert MPC has a significantly better performance and, therefore, higher accuracy and robustness.