The invention discloses a microgrid layered and synchronous control method. The microgrid adopts the double-perturbation synchronous control strategy based on the Fourier transformation to perform synchronous grid connection. In the case of island or grid-connection model of the microgrid, microgrid PCC (point of common coupling) frequency and voltage amplitude is detected by SFR-PLL (synchronous reference frame-phase-locked loop), and by the use of a PI (proportional plus integral) controller of a recovery control loop, zero-error tracking of the microgrid PCC frequency and voltage amplitude to a target frequency and voltage amplitude is achieved. As the microgrid transforms from the island model to the grid-connection model, frequency correction is added in the second-layer control of the microgrid, phase and voltage amplitude are subjected to perturbation control, voltage differences of two sides of a grid-connection switch are performed with the Fourier transformation, the perturbation and observation method is employed to allow the two-side voltage phases and amplitudes synchronous, current shock of a close grid-connection switch to the microgrid is restrained, seamless switching is realized during model transformation, smoothness is improved during the transition process, and guidance is provided for large-scale renewable energy system connection.