This paper proposed a configurable sub-connected architecture with a framework that dynamically activates the near-optimal subset of antennas and RF chains to implement energy-efficient hybrid precoding in millimeter wave multiple-input multiple-output system. Since the exhaust search is computational intractable, we propose a two-stage hybrid precoding algorithm, where the digital precoder is designed to eliminate the inter-user interference by zero-forcing rule. Specifically, in the first stage, we introduce an extended cross-entropy algorithm that adaptively updates the probability distribution of potential states in the analog precoder matrix, which can generate a solution that is close to the optimal with a sufficiently high probability. In the second stage, a QR-based subset selection algorithm is proposed to pick the near-optimal subset of the RF chains to further cut down on the energy cost. Simulation results show that proposed extend-CE algorithm gets favorable performance in terms of energy efficiency, and QR-based RF chain selection can achieve a near-optimal performance. Other hybrid precoding algorithms can also be incorporated into the proposed RF chain selection algorithm.