Optoelectronic devices consist of heterointerfaces formed between dissimilar semiconducting materials. The relative energy level alignment between contacting semiconductors determinately affects the heterointerface charge injection and extraction dynamics. For perovskite solar cells (PSCs), the heterointerface between the top perovskite surface and a charge-transporting material (CTM) is often treated for defect passivation1–4 to improve PSC stability and performance. However, such surface treatments could also affect the heterointerface energetics.1 Here we show that surface treatments may induce a negative work function shift (i.e. more n-type), which activates halide migration to aggravate PSC instability. Therefore, despite the beneficial effects of surface passivation, this detrimental side effect limits the maximum stability improvement attainable for PSCs treated in these ways. This trade-off between the beneficial and detrimental effects should guide further work on improving PSC stability via surface treatments.