This Letter presents the measurement of the fiducial and differential cross-sections of the electroweak production of a Zγ pair in association with two jets. The analysis uses 140 fb−1 of LHC proton–proton collision data taken at s=13 TeV recorded by the ATLAS detector during the years 2015–2018. Events with a Z boson candidate decaying into either an e+e− or μ+μ− pair, a photon and two jets are selected. The electroweak component is extracted by requiring a large dijet invariant mass and by using the information about the centrality of the system and is measured with an observed and expected significance well above five standard deviations. The fiducial pp→Zγjj cross-section for the electroweak production is measured to be 3.6 ± 0.5 fb. The total fiducial cross-section that also includes contributions where the jets arise from strong interactions is measured to be 16.8−1.8+2.0 fb. The results are consistent with the Standard Model predictions. Differential cross-sections are also measured using the same events and are compared with parton-shower Monte Carlo simulations. Good agreement is observed between data and predictions.