This study analyzed gender differences in self-regulated learning components, motivational beliefs and achievement in self-regulated online learning environment. Sample of the study consisted of 145 participants from an online programming course which is based on synchronous and asynchronous communication methods over the Internet. Motivated Strategies for Learning Questionnaire (MSLQ) was used to assess students' motivation and use of learning strategies. Linear stepwise regression method and multivariate analysis of variance were used to analyze the data. The results of the study indicated that test anxiety explained a significant amount of variance in female students' achievement and two variables (self-efficacy for learning and performance, and task value) explained a significant amount of variance in male students' achievement. It was also found that there were not statistically significant mean differences among motivational beliefs, self-regulated learning variables and achievement in programming with respect to gender.