In a photovoltaic DC microgrid, the intermittent power supply of the distributed generation and the fluctuation of the load power will cause the instability of the bus voltage. An improved super-twisting sliding mode control method based on the super-twisting algorithm is proposed to solve this problem. In this paper, a bidirectional half-bridge buck–boost converter was selected as the research topic. The proposed control method replaces the sign function with the saturation function to further mitigate the chattering effect. The stability of the proposed control method was proven to be finite-time convergent using the Lyapunov theory control. Compared with PI control, linear sliding mode control, and terminal sliding mode control, the proposed control method reduces the system overshoot by up to 33% and greatly improves the response speed; compared with the traditional super-twisting sliding mode control method, the system overshoot is reduced by 6.8%, and the response speed is increased by 38%. The experimental results show that the proposed control method can reduce the fluctuation range of the bus voltage, shorten the time of bus voltage stability, effectively stabilize the bus voltage of the photovoltaic DC microgrid, and maintain strong robustness.