Millimeter wave (mmWave) with large-scale antenna arrays is a promising solution to resolve the frequency resource shortage in next generation wireless communication. However, fully digital beamforming structure becomes infeasible due to its prohibitively high hardware cost and unacceptable energy consumption while traditional hybrid beamforming algorithms have unnegligible gap to the optimal up bound. In this paper, we consider a mmWave point-to-point massive multiple-input-multiple-output (MIMO) system and propose a new hybrid analog and digital beamforming (HBF) scheme based on deep reinforcement learning (DRL) to improve the spectral efficiency and reduce system bit error rate (BER). At the base station (BS) side, we propose a novel DRL-based HBF design method called PrecoderNet to design the hybrid precoding matrix. The DRL agent denotes the system sum rate as state and the real /imaginary part of the digital beamformer as actions. For the user side, the minimum mean-square-error (MMSE) criterion is used to design the receiving hybrid precoders which minimizes the distance between the processed signals and the transmitted signals. Furthermore, HBF design algorithm such as weighted MMSE and orthogonal matching pursuit (OMP) are regarded as benchmarks to verify the performance of our algorithm. Finally, simulation results demonstrate that our proposed PrecoderNet outperforms the benchmarks in terms of spectral efficiency and BER while is more tractable in practical implementation.