In the past decade, online music streaming services (MSS), e.g., Pandora and Spotify, revolutionized the way people access, consume and share music. MSS serve users with a huge digital music library, various kinds of music discovery channels, and a number of tools for music sharing and management (e.g. bookmark, playlist, comment, etc.). As a result, metadata and user-generated data hosted on MSS demonstrate great heterogeneity, which provides important potential to enhance music recommendation performance. In this study, we propose a novel music recommendation approach by leveraging heterogeneous graph schema mining and ranking feature selection. Unlike existing heterogeneous graph-based recommendation techniques, the new method can automatically generate and select the optimized meta-path-based features for the learning to rank model. To make feature selection more efficient, we propose the Dynamic Feature Generation Tree algorithm (DFGT), which can activate and eliminate the short sub-meta-paths for feature evolution at a low cost. Experiments show that the proposed algorithm can efficiently generate optimized ranking feature set for meta-path-based music recommendation, which significantly enhances the state-of-the-art collaborative filtering algorithms.