Goal-related messages in a classroom are associated with students' experiences and functioning in learning. However, little is known about need satisfaction as a mediator that translates the classroom messages into students' optimal educational experience. In the present studies, we investigated in a sample of 171 (in Study 1) and 255 (in Study 2) Turkish undergraduate students (60% females; M-age = 19.79, SD = 1.68 and 45% females, M-age = 19.75, SD = 1.67 respectively), the relation of classroom goal structures to students' educational satisfaction (or vitality) and state flow through their experience of need satisfaction considering it as the psychological mediator. Path analysis with bootstrap showed that mastery goal structures (i.e., classroom environment focuses on learning and self-improvement) were positively related to need satisfaction while performance goal structures (i.e., classroom environment focuses on normative success) were either negatively related (Study 1) or unrelated (Study 2) to need satisfaction. Path analysis with bootstrap also showed that mastery goal structures were related to vitality, educational satisfaction and flow in class-related tasks through need satisfaction. Understanding need satisfaction as a mediator of classroom goal structures and optimal educational experience help teachers to reconsider their goal-related messages in the classroom.