A contest usually involves expenditures, termed "overbidding," exceeding the theoretical Nash equilibrium. A considerable number of studies have shown that group identity can affect decision-making and competitive behavior, thus providing a new perspective on alleviating the overbidding problem. How group identity influences brain activity when competitors bid in different groups is not yet clear, however. In this study, we implemented group identity manipulation into the lottery contest game and we recorded behavioral and electroencephalography (EEG) data at the same time. Two experimental treatments were conducted to study the effect of group identity on bidding behavior. The event-related potentials (ERP) and event-related oscillations (ERO) techniques were utilized to explore brain activity differences caused by participants' different bidding behaviors under in-group and out-group conditions. Behavioral results showed that individual expenditure was significantly lower when bidding with in-group opponents than with out-group opponents. Analyses of EEG results revealed that compared to in-group conditions, greater N2 amplitudes and theta power were found under out-group conditions. To extend previous studies, we performed supplementary analysis to explore whether enhancement of group identity had effects on conflict alleviation. Behavioral results indicated that individual expenditure was significantly lower after enhancing group identity when bidding with in-group, and EEG results showed more negative N2 amplitudes, smaller P3 amplitudes and larger theta power after enhancing group identity. Collectively, these findings indicate that group identity modulated bidding behavior, and they provide insight into a mechanism to de-escalate group conflict by enhancing group identity.