Focusing on the fact that the existing research on optimal maintenance decision for remaining useful lifetime (RUL) prediction and imperfect maintenance has low accuracy of RUL prediction and rationality of decision results, an optimal maintenance decision method based on RUL prediction for the equipment subject to imperfect maintenance is proposed in this paper. Firstly, the nonlinear Wiener process is used to characterize the degradation law of the equipment. Secondly, the imperfect maintenance model that meets the upper limit of the maintenance number is established based on the nonhomogeneous Poisson process. Then, based on the concept of the first hitting time, the probability density function (PDF) of the RUL is derived. Finally, based on the RUL prediction results, the optimal maintenance decision model for the equipment subject imperfect maintenance is constructed. Through the example verification and cost parameter sensitivity analysis, the proposed method can effectively improve the accuracy of the RUL prediction and the scientific of maintenance decision results, which has engineering application value.