Two experiments were conducted to examine whether the N2 component of the event-related potential (ERP), typically elicited in a S1-S2 matching task and considered to reflect mismatch process, can still be elicited when the S1 was imagined instead of perceived and to investigate how N2 amplitude varied with the degree of S1-S2 discrepancy. Three levels of discrepancy were defined by the degree of separation between the heard (S2) and imagined (S1) sounds. It was found that the N2 was reliably elicited when the perceived S2 differed from the imagined S1, but whether N2 amplitude increased with the degree of discrepancy depended in part on the S1-S2 discriminability (as evidenced by reaction time). Specifically, the effect of increasing discrepancy was attenuated as discriminability increased from hard to easy. These results, together with the dynamic ERP topography observed within the N2 window, suggest that the N2 effect reflects two sequential but overlapping processes: automatic mismatch and controlled detection.