Modelling learning behaviors and predicting student performance in massive open online courses (MOOCs) are vital for adaptive course planning and personalized intervention. This study proposes a new approach for discovering time-embedded behavioral patterns in micro behaviors of MOOC learners and incorporating them as features for student profiling and learning performance prediction. We embedded discretized time intervals into interaction sequences and used n-gram extraction to output time-related behavioral patterns. With log data from a Python programming MOOC with 591 learners, we exploited exploration data analysis, unsupervised, and supervised learning to elucidate the associations between time-related behavioral patterns and academic performance. Nine out of seventeen targeted patterns are highly correlated with the final grade, in which, three patterns related to the help-seeking, evaluation, and study activities with short or medium intervals (less than two minutes) are strong predictors of academic performance in a very early stage. The time-related behavioral patterns also serve as good features for clustering learners into three groups based on learning behaviors: Sampling learners, Comprehensive learners, and Targeting learners. Our empirical results show the usability of the proposed time-embedded behavioral patterns in immediate diagnosis learners’ engagement, raising new challenges for learning analytics with time concerning to achieve precision education.