The muon spectrometer of the ATLAS detector will undergo a major upgrade during the Long Shutdown 3, in order to cope with the operational conditions at the high-luminosity LHC. The trigger and readout electronics for the Resistive Plate Chambers (RPC), Thin Gap Chambers (TGC), and Monitored Drift Tube (MDT) chambers will be replaced to make them compatible with a new trigger scheme with higher trigger rates and longer latencies. MDT precision chambers, that at the moment are not included in the hardware trigger, will be integrated into the level-0 trigger in order to sharpen the momentum threshold. The MDT front-end electronics will also be replaced. New-generation RPC chambers will be installed in the inner barrel layer to increase the acceptance and robustness of the trigger. Some of the MDT chambers in the inner barrel layer will be replaced with new small-diameter MDTs. New TGC triplet chambers in the barrel-endcap transition region will replace the current TGC doublets to suppress the high trigger rate from random coincidences in this region. A major upgrade of the power system is also planned. The Phase-II upgrade concludes the process of adapting the muon spectrometer to the ever increasing performance of the LHC, which started with the Phase-I upgrade New Small Wheel (NSW) project that will replace the innermost endcap wheels.