The purpose of this study was to propose design elements for the use of gamification in educational settings to provide a sense of play and learning to the students. This design-based research was carried out in two implementations, in which two different graduate courses were designed using gamification. The design portion of the study was followed by an assessment, based on which a framework for gamification design was constructed. It was found that the competition-based and intriguing activities of high intrinsic interest resulted in concrete achievements, which motivated the students by giving them a sense of play. In addition, the implementations that supported learning were found to be both collaborative and individual activities that mobilized the students into active participation. In both implementations, the students reported enjoying most of the activities and lessons and found that the competitive implementations incorporating social games into the lesson topics increased their motivation. The resulting framework for the gamification design specifies recommended elements of gamification for increasing learner motivation, active participation, fun, and learning.