To strengthen data privacy and security, federated learning as an emerging machine learning technique is proposed to enable large-scale nodes, e.g., mobile devices, to distributedly train and globally share models without revealing their local data. This technique can not only significantly improve privacy protection for mobile devices, but also ensure good performance of the trained results collectively. Currently, most the existing studies focus on optimizing federated learning algorithms to improve model training performance. However, incentive mechanisms to motivate the mobile devices to join model training have been largely overlooked. The mobile devices suffer from considerable overhead in terms of computation and communication during the federated model training process. Without well-designed incentive, self-interested mobile devices will be unwilling to join federated learning tasks, which hinders the adoption of federated learning. To bridge this gap, in this paper, we adopt the contract theory to design an effective incentive mechanism for simulating the mobile devices with high-quality (i.e., high-accuracy) data to participate in federated learning. Numerical results demonstrate that the proposed mechanism is efficient for federated learning with improved learning accuracy.