There is a growing need for robotic apple harvesting due to decreasing availability and rising cost in labor. Towards the goal of developing a viable robotic system for apple harvesting, this paper presents synergistic mechatronic design and motion control of a robotic apple harvesting prototype, which lays a critical foundation for future advancements. Specifically, we develop a deep learning-based fruit detection and localization system using a RGB-D camera. A three degree-of-freedom manipulator is designed with a hybrid pneumatic/motor actuation mechanism to achieve dexterous movements. A vacuum-based end-effector is used for apple detaching. These three components are integrated into a robotic apple harvesting prototype with simplicity, compactness, and robustness. Moreover, a nonlinear control scheme is developed for the manipulator to achieve accurate and agile motion control. Field experiments are conducted to demonstrate the performance of the developed apple harvesting robot.