Baiji refinery produces many pollutants from fuel combustion, which can cause the soil to become contaminated with heavy metals. This research examines the contamination variables in the soil next to the refinery. Four soil samples were taken from various locations to evaluate five heavy metals (Ni, Zn, Co, Cr, and Pb). The results found that the percentage of the metal (Ni) at site No. 1 was the highest, 149.945524 ppm, due to its presence near the oil flame and in the direction of the wind. Two indices were applied to detect pollution levels: Pollutant Load Indicator (PLI) and Toxicity Factor (CF). The Co, Cr, Zn, and Pb showed class 1 relative values, indicating that the sites were only slightly polluted, while the Ni showed class 2 relative values, indicating moderate ranges of pollution. While the contamination factor for Ni was classified as class 2, indicating moderate contamination, the contamination factors for Co, Cr, Pb, and Zn were all rated as class 1, which indicates low contamination values. PLI levels in all investigated sites categorized as class 1 indicate slight contamination as a result of the gases released by the predominant wind impacting the metal percentage distribution pattern.