A robust and reliable analytical procedure for the determination of trace (mg∙kg−1) and ultra-trace elements (μg∙kg−1) in soil and sediments by inductively coupled plasma quadrupole mass spectrometry (ICP-QMS) was optimized. Aliquots of ∼200 mg of two certified reference materials (IAEA Soil-7, soil and IAEA SL-1, lake sediments) were digested in nitric acid (HNO3) purified twice by sub-boiling distillation using a microwave-heated high-pressure autoclave. Incremental addition of tetrafluoroboric acid (HBF4, 0.1–2 mL) to HNO3 was evaluated for yield. The selection of appropriate proportions of digestion acids was crucial to obtain accurate results. Digested samples were analyzed for a range of trace elements including those that are potentially toxic (Ag, Cd, Pb, Sb, and Tl), plant micronutrients (Cu, Fe, Mn, and Zn), those enriched in bitumen (Mo, Ni, and V), and lithophile elements (Al, Ba, Co, Cr, Rb, Sr, Th, Ti, Y, and Zr). Nitric acid alone proved to be sufficient to completely liberate Cd, Co, Cr, Fe, Mn, Ni, Pb, V, and Zn in both soil and sediments (87%–120% recovery). For almost all the other elements, addition of HBF4 was needed for improved recovery. A combination of 3 mL of HNO3 and 1.5 mL of HBF4 was optimal to fully liberate an extended list of elements including Ba, Sb, and Sr from both the reference materials. Conservative lithophile elements (Th, Ti, Y, and Zr) could not be completely recovered with the proposed method, requiring hydrofluoric acid for complete dissolution of recalcitrant minerals.