The invention discloses a method and a device for man-machine synchronization of an invasive respirator in a noninvasive ventilation mode. The method comprises the following steps: measuring so as to obtain airway pressure, inspiration flow and expiration flow; according to a preset leakage estimation model, calculating the airway pressure, the inspiration flow and the expiration flow so as to obtain leakage flow; and compensating the basic flow by using the leakage flow. According to the method and the device, the leakage flow is estimated through the leakage estimation model, and the leakage compensation is realized, so that the purposes that the invasive respirator is improved so as to carry out noninvasive ventilation, and the man-machine synchronous performance is improved, are achieved.