Perovskite solar cells have exhibited astonishing photoelectric conversion efficiency and have shown a promising future owing to the tunable content and outstanding optoelectrical property of hybrid perovskite. However, the devices with planar architecture still suffer from huge Voc loss and severe hysteresis effect. In this research, Guanidine hydrobromide (GABr) post-treatment is carried out to enhance the performance of MAPbI3 n-i-p planar perovskite solar cells. The detailed characterization of perovskite suggests that GABr post-treatment results in a smoother absorber layer, an obvious reduction of trap states and optimized energy level alignment. By utilizing GABr post-treatment, the Voc loss is reduced, and the hysteresis effect is alleviated effectively in MAPbI3 solar cells. As a result, solar cells based on glass substrate with efficiency exceeding 20%, Voc of 1.13 V and significantly mitigated hysteresis are fabricated successfully. Significantly, we also demonstrate the effectiveness of GABr post-treatment in flexible device, whose efficiency is enhanced from 15.77% to 17.57% mainly due to the elimination of Voc loss.