Shallots have been widely planted as the primary commodity crop in Brebes Regency, Central Java, Indonesia. Information on the distribution of heavy metals in the shallot fields of Brebes Regency, Central Java, Indonesia, is not yet available. Hence, the present study was conducted to identify the concentration and spatial distribution of several heavy metals (Pb, Cd, Co, Cr, and Ni) and their possible sources in the shallot fields through a field survey and a series of laboratory and statistical tests. The total concentration of heavy metals was analyzed from 184 sampling points of the shallot fields in Brebes Regency, Central Java, Indonesia, during the dry season from August to October 2019. The heavy metals concentration was as follows: Cr > Ni > Pb > Co > Cd. The values of total Pb, Cd, Co, Cr, and Ni concentrations in the soils were 7.84–18.94, 0.99–2.31, 3.02–9.98, 10.40–49.55, and 10.17–26.62 mg kg−1, respectively. All these concentration values of heavy metals are still lower than the critical values for agricultural soils and lower than the topsoil background values except Cd. Based on the concentration of heavy metals, the shallot fields in Brebes Regency, Central Java, are classified as uncontaminated soils. Multivariate and geostatistical analyses were employed to determine and describe the metals’ origin. Pb, Cr, and Ni mainly originate from a natural source, while Cd and Co are from anthropogenic sources (agricultural practices and industry).