This paper describes the most important topics on automation modernization of electrical repowering system of oil refinery in Mexico with IEC-61850. A strategic automation approach for protection, metering, and control is presented, as well as a description on how to automate the electrical equipment in order to reach a thorough communication level according to the standard IEC-61850, including station, bay, and, process buses and their interoperability concepts. A proposal for process bus, considering several scenarios with merging units interface, is presented. On the other hand, the repowering electrical system have several energy sources, with different conditions and challenges to solve, one of them is the integration of equipment with IEC 61850 protocols, other scenario is the system synchronization. Furthermore, the benefits on improvement in power quality and a scheme to avoid the high costs of maintenance are discussed. With the upgrading of the electrical system, the electrical demand is considered cover for all refining processes, including the new production plant of ultralow sulfur clean gasoline.