Gamification has been widely adopted in various online learning contexts to better engage and motivate users. However,the extant literature still lacks consistent empirical evidence on the effectiveness of online gamified learning. Based on needs-affordances-features( NAF) perspective,we draw on self-determination theory and psychological ownership theory to analyze how gamified competition,including indirect competition ( such as a leaderboard) and direct competition ( such as one-on-one player-killing,or PK in short) in online learning apps provide motivational affordances to users. We collect data from a popular online language learning app and construct a large scale panel dataset. By the econometric analysis of using propensity score matching and difference in difference method,we find that our hypotheses are supported. We are among the first to explore the effect of using gamification modules in the voluntary online learning contexts. This study enriches the relevant literature and sheds light on practice.