ABSTRACTWhile weather radar is widely used for quantitative precipitation estimation (QPE) in China and many other countries, the performance of radar QPE is unsatisfactory. A major reason for inaccurate radar QPE is the application of conventional Z–R relationships. In this study the entire vertical profile of reflectivity (VPR) is taken into consideration and a new relationship converting the VPR to rainfall rate is developed. The new relationship is obtained by a proposed terrain‐based weighted random forests (TWRF) method. The TWRF method regards 21 levels of constant altitude plan position indicator reflectivity (from 1 to 18 km) as features. The method consists of two parts: the first is to obtain subregions based on terrain, and the second is to refine the classical random forests method by computing feature weights based on correlation co‐efficients between features and rainfall rate. Radar QPE based on the TWRF method was tested within the 45–100 km range of the radar in Hangzhou, China, on rainfall events in 2014. The proposed method showed improved performance for all verification scores over the Z–R relationship and the classical random forests method. Use of the entire VPR and the terrain‐based study proved to be effective in this example. Experimental results indicate that the proposed TWRF method can improve the accuracy of radar QPE compared to an independent network of rain gauges.