Although privacy-preserving is often considered in energy management and energy scheduling of microgrids (MGs), to the best of authors’ knowledge, there are almost no literatures on distributed secondary control of MGs with privacy-preserving. To fill this gap, this article investigates the privacy-preserving problem for voltage restoration of an ac MG. First, the model of the MG is transformed into a linear multiagent system model by feedback linearization. Furthermore, output mask approach, which avoids divulging the initial condition by inserting a dynamic mask on the exchanged state information, is adopted to make the distributed generator agents exactly converge to the reference value rather than the value with a preset certain convergence error by differential private. Meanwhile, the sliding mode control scheme with simple structure is adopted to accelerate the convergence speed of the masked system. However, it is difficult to design the controller directly because of the strong nonlinearity brought by the mask function. To solve this problem, we first implement the controller for the original system, and then extend it to the masked system. After that, we carry out the consensus analysis of the controlled masked system. Finally, the effectiveness of the proposed control scheme is validated in the MATLAB/Simulink environment.