This study was conducted to assess the effect of two thermal treatments, viz. roasting and pan frying (deep frying), on nutritional profile, aflatoxin, and capsaicin content in green chilies. Green chilies were subjected to roasting and frying to reduce the aflatoxin contamination, besides retaining their pungency and nutritional profile. Reversed‐phase HPLC was employed to determine the levels of aflatoxins B1, B2, G1, and G2 in thermally treated and control samples. The proximate compositions of roasted and fried chili samples were significantly (p ≤ .05) different from raw chili (control), except ash content. Vitamin A levels decreased significantly (p ≤ .05) during roasting and were undetected in fried chili samples. Likewise, vitamin C was undetected in both roasted and fried chili samples. Significantly decreasing (p ≤ .05) trends were noticed in capsaicinoids viz. capsaicin and dihydrocapsaicin contents including Scoville Heat Units (SHU) during roasting and frying. However, retention of capsaicinoids was higher in roasted chilies (730.00 ± 4.90 mg/kg) than fried samples (502.56 ± 5.10 mg/kg). The levels of all the four major aflatoxins (AFs)‐ AFB1, AFB2, AFG1, and AFG2 recorded in control were much higher than the limits prescribed by the European Union for spices. Both thermal treatments (roasting and frying) employed proved to be effective in reducing aflatoxins like AFB2, AFG1, and AFG2 in chilies to below the prescribed limits, while as the level of AFB1 was reduced below the limits by only the frying method. This study therefore indicated the substantial impact of frying on aflatoxins.