It is of prime importance to determine the presence of trace heavy metals, especially cadmium (Cd2 + ) and lead (Pb2 + ) in rice to ensure food safety as it is the staple source of the daily caloric intake of Asians. This work utilized anodic stripping voltammetry (ASV) for the determination of heavy metals due to its portability for in situ measurements. A glassy electrode modified with silver nanoparticles (AgNP), bismuth nanoparticles (BiNP), multiwalled carbon nanotubes (MWCNT) and Nafion was fabricated to serve as the working electrode. The morphology of the fabricated electrode was characterized using scanning electron microscopy and x-ray diffraction, its elemental composition was determined by energy dispersive spectroscopy, its chemical bonds were identified using Fourier transform infrared spectroscopy, and its electrochemical behavior was measured via cyclic voltammetry. The electrode showed high stability at 50 continuous scans. The optimal deposition time, accumulation time and scan rate were determined to be 80 s, 60 s and 100 mV s−1, respectively. The detection limit for Cd2 + and Pb2 + were determined to be 25.12 ppb and 20.55 ppb, respectively. Rice samples were analyzed and the transfer factor of the heavy metals were determined at each isolated part. The ASV results were validated with atomic absorption spectroscopy.