This study examines the validity of task-specific anxiety and self-efficacy and the joint effects of task-specific and general second language (L2) writing anxiety and self-efficacy on learning gains resulting from different task conditions formed based on two types of written corrective feedback and two types of task planning. 115 high school EFL learners in South Korea were divided into two groups and received either direct correction or metalinguistic feedback on their wrong use of English articles and past tense in their written narratives. After receiving feedback, each of the two large groups was further divided into three subgroups, each performing a second writing task under three conditions: pre-task planning, within-task planning, and no planning. The learners responded to questionnaires that aimed to measure task-specific and L2 general anxiety and self-efficacy. The results demonstrated that task-specific anxiety and self-efficacy were distinct from general L2 writing anxiety and self-efficacy and that they played different roles in L2 development under the different treatment conditions. Specifically, general L2 writing anxiety was a negative predictor of learning gains regardless of learning condition; task-specific anxiety showed a positive effect in metalinguistic explanation + within-task planning but a negative effect in all other task conditions; neither task-specific nor general L2 self-efficacy was a significant predictor of treatment effects. This study demonstrates the importance of investigating task-specific individual difference variables and shows the differential associations between general and task-specific individual difference variables on one hand and different types of task-based instruction on the other.