This work presents a control strategy for integrating an offshore wind farm into the onshore electrical grid using a high-voltage dc transmission system based on modular multilevel converters. The proposed algorithm allows the high-voltage DC system to operate in grid-connected or stand-alone modes, with the second case supplying power to local loads. In either mode, the modular multilevel rectifier works as a grid-forming converter, providing the reference voltage to the collector network. During grid-connected operation, the modular multilevel inverter regulates the DC link voltage while the generating units are controlled to maximize power extracted from the wind turbines. Conversely, in the event of grid disconnection, the onshore modular multilevel converter takes over the regulation of the AC voltage at the point of connection to the grid, ensuring energy supply to local loads. Simultaneously, the generator controller transitions from tracking the maximum power of the wind turbines to regulating the DC link voltage, preventing excessive power injection into the transmission DC link. Additionally, the turbine pitch angle control regulates the speed of the generator. Mathematical models in the synchronous reference frame were developed for each operation mode and used to design the converter’s controllers. A digital model of the wind power plant and a high-voltage dc transmission system was implemented and simulated in the PSCAD/EMTDC program. The system modeled includes two groups of wind turbines, generators, and back-to-back converters, in addition to a DC link with a rectifier and an inverter station, both based on modular multilevel converters with 18 submodules per arm, and a 320 kV/50 km DC cable. Aggregate models were used to represent the two groups of wind turbines, where 30 and 15 smaller units operate in parallel, respectively. The performance of the proposed control strategy and the designed controllers was tested under three distinct scenarios: disconnection of the onshore converter from the AC grid, partial loss of a wind generator set, and reconnection of the onshore converter to the AC grid.