Mixed-halide perovskites have emerged as a promising candidate for optoelectronics, due to their tunable optical properties. However, photoinduced phase segregation remains an obstacle for stable performance in solar cells. Here, we have conducted both bulk and nanoscale measurements to elucidate the mechanism of halide ion migration that leads to phase segregation. By utilizing Kelvin probe force microscopy (KPFM) under illumination, we have observed the time-evolution of ion migration to and from grain boundaries that agreed with bulk photoluminescence spectra of perovskites with a wide range of band gaps (1.67-1.88 eV), Cs0.15FA0.65MA0.20Pb(IxBr1-x)3 where x = 0.47-0.80. By visualizing the changes of band bending at grain boundaries, we deduce that halide segregation is dominantly caused by iodide ions, given faster ion migration in perovskite materials with a higher iodine content. Further, we verify that the changing rate of band bending at grain boundaries is consistent with the emerging rate of I-rich phase at grain boundaries, suggesting the influence of iodide ion migration toward grain boundaries on I-rich phase transition. This work will help provide insight for interpreting the mechanism of light-halide ion interactions.