Federated learning is an emerging machine learning paradigm where multiple clients (e.g., mobile devices) train models locally to formulate a global model under the coordination of a central server. The concept of federated learning was introduced by Google in 2016 and has attracted significant interest from both academia and industry. The objective of this work is to identify the state-of-the-art in federated learning from a software engineering perspective. We performed a systematic literature review in which we extracted 231 primary studies selected from 1074 papers that resulted from an automatic search. The results of our investigation show that most of the known motivations of federated learning appear to be the most studied federated learning challenges, including data privacy, communication efficiency, and statistical heterogeneity. To tackle the challenges of federated learning, the top five proposed approaches are model aggregation, training management, incentive mechanism, privacy preservation, and resource management. Also, there are only a few real-world applications of federated learning. There is a lack of systematic guidelines for the design and development of federated learning systems. More studies are needed before production-level adoption of federated learning can take place in practice.