This study is based on agricultural soil samples which are collected along three traverses (A, B, C), near the gypsum quarries located near the village of Bajwan north of Kirkuk city, to conduct a geochemical analysis and determining some heavy elements (Co, Cr, Ni, Cu, Sr, Pb, Cd) levels in the surface and subsurface soil horizons, and to indicate the potential sources of contamination with these elements. Accordingly, 30 samples were collected (six samples from travers A, five samples from travers B, and four samples from travers C) from the soil for each of the surface and subsurface levels. The results showed that the average concentrations of most studied elements increased in the subsurface soil compared to the surface soil, as a result of the influence of different geological and environmental conditions on the distribution of these elements in different soil horizons. The concentrations of the studied elements (Co, Ni, Cd) are more than their natural concentrations when compared to the natural abundance of these elements in the earth's crust, which indicates an increase in the concentration of these elements in the soil as a result of the proximity of the study area to the oil industries activities, causing the emission of high concentrations of heavy elements. As well as the traffic density of vehicles, causing the release of high concentrations of some elements. The geo accumulation factor (Igeo) indicates that most of the soil samples within different horizons of most of the heavy elements are uncontaminated to moderately contaminated, and moderately contaminated for cadmium. Also, by calculating the RI and the environmental risk factor (Er), it was found that the relative content of cadmium in soil samples recorded a considerable potential ecological risk to a high potential ecological risk. This indicates high affinity of cadmium in the soil as its infiltration into the subsurface layers.