The underrepresentation of racial minorities and women in science, technology, engineering, and mathematics (STEM) disciplines is a national concern. Goal theory provides a useful framework from which to understand issues of underrepresentation. We followed a large sample of high-achieving African American and Latino undergraduates in STEM disciplines attending 38 institutions of higher education in the United States over 3 academic years. We report on the science-related environmental factors and person factors that influence the longitudinal regulation of goal orientations. Further, we examine how goal orientations in turn influence distal academic outcomes such as performance and persistence in STEM. Using SEM-based parallel process latent growth curve modeling, we found that (a) engagement in undergraduate research was the only factor that buffered underrepresented students against an increase in performance-avoidance goals over time; (b) growth in scientific self-identity exhibited a strong positive effect on growth in task and performance-approach goals over time; (c) only task goals positively influenced students' cumulative grade point average, over and above baseline grade point average; and (d) performance-avoidance goals predicted student attrition from the STEM pipeline. We discuss the implications of these findings for underrepresented students in STEM disciplines.