Ultra performance liquid chromatography–tandem mass spectrometry and multivariate analysis were used to exploit the effect and further synergistic or antagonistic interactions of main phenolic compounds with the same ratios as in spices consumed in China, on the profiles of HAs in roast beef patties. Quantitative levels of harman (1-methyl-9H-pyrido[3,4-b]indole), norharman (9H-pyrido[3,4-b]indole), PhIP (2-amino-1-methyl-6-phenylimidazo[4,5-b]pyridine), DMIP (2-amino-1,6-dimethylimidazo[4,5-b]pyridine), 1,5,6-TMIP (2-amino-1,5,6-trimethylimidazo[4,5-b]pyridine), MeIQx (2-amino-3,8-dimethylimidazo[4,5-f]quinoxaline) and 4,8-DiMeIQx (2-amino-3,4,8-trimethylimidazo[4,5-f]quinoxaline) were detected in all of the beef patties. The formation of most of these seven HAs was significantly (P<0.05) enhanced by phenolic compounds. Mixed and corresponding single phenolic compounds had different effects on HA profiles. DMIP, 1,5,6-TMIP and 4,8-DiMeIQx were investigated as differentiating factors for single compounds, while harman and MeIQx for mixed ones. Moreover, certain combination of phenolic compounds have synergistic on harman, norharman and MeIQx, but antagonistic effects on the formation of DMIP and 4,8-DiMeIQx. The results may shed light on the mechanism for the effects of spices on the formation of HAs.