X-ray detectors are broadly utilized in medical imaging and product inspection. Halide perovskites recently demonstrate excellent performance for direct X-ray detection. However, ionic migration causes large noise and baseline drift, limiting the detection and imaging performance. Here we largely eliminate the ionic migration in cesium silver bismuth bromide (Cs2AgBiBr6) polycrystalline wafers by introducing bismuth oxybromide (BiOBr) as heteroepitaxial passivation layers. Good lattice match between BiOBr and Cs2AgBiBr6 enables complete defect passivation and suppressed ionic migration. The detector hence achieves outstanding balanced performance with a signal drifting one order of magnitude lower than all previous studies, low noise (1/f noise free), a high sensitivity of 250 µC Gy air−1 cm–2, and a spatial resolution of 4.9 lp mm−1. The wafer area could be easily scaled up by the isostatic-pressing method, together with the heteroepitaxial passivation, strengthens the competitiveness of Cs2AgBiBr6-based X-ray detectors as next-generation X-ray imaging flat panels.