A simple, efficient, and reliable ultrasound-assisted digestion (UAD) procedure was used for sample preparation prior to quantitative determination of trace Cd and Pb contaminants in herbal medicines using flame atomic absorption spectrometry. The parameters influencing UAD such as the solvent system, sample mass, presonication time, sonication time, and digestion temperature were evaluated. The efficiency of the proposed UAD procedure was evaluated by comparing with conventional acid digestion (CAD) procedure. Under the optimum conditions, linear calibration graphs in a range of 2-250 μg/L for Cd, and 50-1000 μg/L for Pb were obtained with detection limits of 0.56 μg/L and 10.7 μg/L for Cd and Pb, respectively. The limit of quantification for Cd and Pb were 1.87 μg/L and 40.3 μg/L, respectively. The repeatability for analysis of 10 μg/L for Cd and 100 μg/L for Pb was 2.3% and 2.6%, respectively. The accuracy of the proposed method was evaluated by rice flour certified reference materials. The proposed method was successfully applied for analysis of trace Cd and Pb in samples of various types of medicinal plant and traditional medicine consumed in Thailand. Most herbal medicine samples were not contaminated with Cd or Pb. The contaminant levels for both metals were still lower than the maximum permissible levels of elements in medicinal plant materials and finished herbal products sets by the Ministry of Public Health of Thailand. The exception was the high level of Cd contamination found in two samples of processed medicinal plants.