Contingent attentional capture suggests that top-down attentional control settings (ACS) can enhance attentional processing of task-relevant properties and inhibit attentional processing of task-irrelevant properties. However, it remains unclear how ACS operates when a distractor has both task-relevant and task-irrelevant characteristics. In the present study, two lateralized ERP components, N2pc and distractor positivity (Pd), were employed as markers of attentional enhancement and inhibition, respectively. The degree of matching between a distractor and a conjunctively defined target was manipulated to illustrate attentional guidance by category-specific ACS (cACS) and feature-specific ACS (fACS), and the relative position between the distractor and the target was manipulated to isolate the processing of the distractor and the target. Experiment 1 showed that, with a long display duration for searching, a reliable N2pc component was elicited by a distractor that was feature-matched but category-mismatched (C-F+) relative to the target-defined properties, suggesting an enhancing effect of fACS. In contrast, Experiment 2 demonstrated that, with a short display duration, a Pd component was elicited by a distractor that was feature-mismatched but category-matched (C+F-) relative to the target-defined properties, suggesting an inhibitory effect of fACS. Moreover, both attentional enhancement and inhibition were only triggered by fACS but not by cACS. In summary, ACS can enhance target-relevant properties or inhibit target-irrelevant properties in response to the display duration, and fACS affects both enhancement and inhibition more than cACS.