As toxic metals, Hg and Cd are a concern for food safety and human health; their rapid and portable analysis is still a challenge. A portable and rapid Hg–Cd analyzer constructed from a metal–ceramic heater (MCH)-based electrothermal vaporizer (ETV), an on-line catalytic pyrolysis furnace (CPF), a compositePt/Nitrap, and a homemade miniature atomic absorption spectrometer (AAS) was proposed for grain analysis in this work. To enhance sensitivity, a new folded light path was designed for simultaneous Hg and Cd analysis using charge coupled device (CCD) in AAS. To eliminate the grain matrix interference, a catalytic pyrolysis furnace with aluminum oxide fillers was utilized to couple with a compositePt/Nitrap. The method limits of detection (LODs) were 1.1 μg/kg and 0.3 μg/kg for Hg and Cd using a 20 mg grain sample, fulfilling the real sample analysis to monitor the grain contamination quickly; linearityR2> 0.995 was reached only using standard solution calibration, indicating the sample was free of grain matrix interference. The favorable analytical accuracy and precision were validated by analyzing real and certified reference material (CRM) grains with recoveries of 97–103% and 96–111% for Hg and Cd, respectively. The total analysis time was less than 5 min without sample digestion or use of any chemicals, and the instrumental size and power consumption were <14 kg and 270 W, respectively. Compared with other rapid methods, this newly designed Hg–Cd analyzer is proven to be simple, portable, and robust and is, thus, suitable to quickly monitor Hg and Cd contamination in the field to protect grain and food safety.