A direct current (DC) microgrid containing a photovoltaic (PV) system, energy storage and charging reduces the electric energy conversion link and improves the operational efficiency of the system, which has a broad development prospect. The instability and randomness of PV and charging loads pose a challenge to the safe operation of DC microgrid systems. The safety of grid operation and charging need to be taken into account. However, few studies have integrated the safety of charging devices with grid operation. In this paper, a two-level control strategy is used for the DC microgrid equipped with hybrid energy storage systems (ESSs) with the charging equipment’s safety as the entry point. The primary control strategy combines the health of the charging equipment with droop control to effectively solve the problem of common DC bus voltage deviation and power distribution. The consistency the control algorithm for multiple groups of hybrid ESSs ensures the local side DC bus voltage level and ensures reasonable power distribution among the ESSs. The simulation results in MATLAB/Simulink show that the control strategy can achieve power allocation with stable voltage levels in the case of fluctuating health of the charging equipment, which guarantees the safe operation of the microgrid and charging equipment.