PurposeThis study aims to investigate how the social identity theory and emotional attachment theory influence the willingness of consumers to buy foreign cosmetic products. Specifically, this study examines the relationship between consumer ethnocentrism, foreign product judgment and willingness to buy foreign products. Furthermore, the interaction effect of consumer affinity and patriotism are tested in the model.Design/methodology/approachAn online survey of 208 millennial Muslim women consumers was used to collect the data. The structural equation modeling test was used to assess the six hypotheses. Moreover, the two-step estimation approach was used to test the interaction moderation of consumer affinity and patriotism.FindingsThe results indicate that consumer ethnocentrism has a positive and significant relationship with foreign product judgment. Foreign product judgment was also found to have a positive and significant relationship with willingness to buy. In addition, this study concludes that affinity was found to moderate the relationship between consumer ethnocentrism and foreign product judgment and strengthen the positive and significant effect of foreign product judgment on the willingness to buy. Finally, patriotism did not moderate the relationship between consumer ethnocentrism and foreign product judgment. However, patriotism moderated the relationship between foreign product judgment and willingness to buy.Research limitations/implicationsThis study only focused on one category (i.e. low involvement product), and the authors recommend future studies to examine a high involvement product. Other individual orientation constructs, such as xenocentrism, need to be examined in future studies. Moreover, only intentional measures were investigated. Thus, further research could correlate intentional measures with product ownership. Finally, future research could examine how consumers behave differently across nations. Thus, the present model would require cross-cultural research.Practical implicationsMarketers focusing on global branding and international marketing can benefit from the findings of this paper by understanding the antecedents of consumers’ willingness to buy in the foreign cosmetic products setting. Additionally, foreign cosmetic marketers could focus on consumer affinity to strengthen the communication with and arouse the affinity of Muslim millennials women consumers in Indonesia. Finally, marketers can incorporate messages and signals of patriotism in their marketing communications to increase Muslim millennial women consumers’ love and pride.Social implicationsThe growing obsession with beauty among women has led to the immense growth of the cosmetics industry. This phenomenon has spawned an abundance of cosmetic products on the market. The advancement of information technology has further increased competition for cosmetic products as more products can be quickly brought to market. Muslim millennials consumers must be aware and careful about raw materials, impacts on long-term health, impacts on the national economy, environmental impacts and halal certification when using various kinds of cosmetics.Originality/valueThis study contributes to the literature on international marketing research by incorporating the interactive effect of consumer affinity and patriotism in the acceptance of foreign cosmetic products.