The emerging millimeter-wave (mmWave) massive multiple-input multiple-output (MIMO) with lens antenna arrays, which is also known as beamspace MIMO, can effectively reduce the required number of power-hungry radio frequency (RF) chains. Therefore, it has been considered as a promising technique for the upcoming 5G communications and beyond. However, most current studies on beamspace MIMO have not taken into account the important power leakage problem in beamspace channels, which possibly leads to a significant degradation in the signal-to-noise ratio (SNR) and the system sum-rate. To this end, we propose a beam aligning precoding method to handle the power leakage problem in this paper. Firstly, a phase shifter network (PSN) structure is proposed, which enables each RF chain in beamspace MIMO to select multiple beams to collect the leakage power. Then, a rotation-based precoding algorithm is designed based on the proposed PSN structure, which aligns the channel gains of the selected beams towards the same direction for maximizing the received SNR at each user. Furthermore, we reveal some system design insights by analyzing the sum-rate and energy efficiency (EE) of the proposed beam aligning precoding method. In simulations, the proposed approach is found to achieve the near-optimal sum-rate performance compared with the ideal case of no power leakage, and obtains a higher EE than the existing schemes with either a linear or planar array.