The design and implementation of an energy-management system (EMS) applied to a residential direct current microgrid (DC-µG) is presented in this work. The proposed residential DC-µG is designed to provide a maximum power of one kilowatt by using two photovoltaic arrays (PAs) of 500 W, a battery bank (BB) of 120 V–115 Ah, a supercapacitor module of 0.230 F and a bidirectional DC–AC converter linked to the AC main grid (MG). The EMS works as a centralized manager and it defines the working operation mode for each section of the DC-µG. The operation modes are based on: (1) the DC-link bus voltage, (2) the generated or demanded power to each section of the DC-µG and (3) the BB’s state of charge. The proposed EMS—during the several working operation modes and at the same time—can obtain the maximum energy from the PAs, reduce the energy consumption from the main grid and keep the DC-link bus voltage inside a range of 190 V ± 5%. The EMS and local controllers are implemented by using LabVIEW and NI myRIO-1900 platforms. Moreover, experimental results during connection and disconnection of each DC-µG sections and different on-the-fly transitions are reported, these results focus on the behavior of the DC bus, which shows the DC bus robustness and stability. The robustness of the DC-µG is demonstrated by maintaining a balance of energy between the sources and loads connected to the DC bus under different scenarios.