Heterocyclic aromatic amine (HCA) compounds, which are formed by heat treatment in foods, have the potential to cause serious negative effects on human health (carcinogen) when consumed with food. The aim of this study was to examine the effect of pumpkin seed oil (PSO) and rosehip seed oil (RSO) on the formation of HCA compounds in beef meatballs cooked by using different cooking methods (pan frying and oven methods) and different temperatures (150°C, 200°C, and 250°C). 2-amino-3-methyl-3H-imidazo[4,5-f]quinoline (IQ), 2-amino-3,8-dimethylimidazo[4,5-f]quinoxaline (MeIQx), 2-amino-3,4,8-trimethylimidazo[4,5-f]quinoxaline (4,8-DiMeIQx), 2-amino-1-methyl-6-phenylimidazo[4,5-b]pyridine (PhIP), 1-methyl-9Hpyrido[4,3-b]indole (harman), and 9H-pyrido[4,3b]indole (norharman) compounds were determined by high-performance liquid chromatography (HPLC). IQ, MeIQx, and 4,8-DiMeIQx were quantified with diode array detector. PhIP, norharman, and harman were quantified with fluorescence detector. In general, the total HCA formation was higher in the pan-cooked samples compared to the oven-baked samples, while an increase in HCA concentrations was determined with an increase in temperature. Although both oils had significant (p < .05) effects on HCA compounds compared to the control group, the inhibitory effect of PSO on HCA compounds was higher than RSO. With the addition of PSO and RSO at different concentrations (1% and 2%), HCA formation in meatballs could be inhibited by 19.95%–83.14% and 22.21%–77.23%, respectively. Practical applications In this study, pumpkin seed oil (PSO) and rosehip seed oil (RSO) were added to the meatballs in the ratio of 1% and 2% to show the effects of these extracts on heterocyclic aromatic amine (HCA) formation. Control and enriched samples were cooked at 150°C, 200°C, and 250°C in a pan and oven, and the effects of cooking method and also temperature on HCA amounts in meatball samples were evaluated. The formation of HCA compounds in meatballs, which is one of the most widely consumed meat products, could be inhibited significantly by the addition of 1% and 2% natural antioxidant PSO and RSO. The highest total HCA formation in meatball samples was obtained in the control samples (26.94 ng/g) cooked at 250°C. In general, the total HCA content of the meatballs cooked in the pan was higher than those cooked in the oven, and it was seen that the total HCA formation decreased as the oil content increased. PSO and RSO were effective natural antioxidants for inhibiting HCA formation. These natural antioxidants could be used for the enrichment of different cooked meat products for decreasing the formation of carcinogenic compounds such as HCAs. The obtained results could be used to estimate the human intake of HCAs and supplied to the search of good food additives that reduce the threat of exposure to HCAs, and thus to advance the food security and quality.