Next generation mobile networks will face the unprecedented demand for higher data rates. To satisfy this demand, the dense deployment of heterogeneous wireless networks (HetNets) is a promising solution. One of the major challenges in dense HetNets is to dynamically allocate the resources such as power and channel so that the energy efficiency and throughput of the network improve. One of the important techniques for improving the energy efficiency of the base station (BS) is BS ON-OFF switching which allows the BS to turn off some of its components in lower load situations. On the other side, due to the proximity of BSs in the dense HetNets, co-channel interference (CCI) becomes a critical problem and significantly impacts the performance of the network. In this paper, we propose a dynamic channel assignment based on a learning algorithm (DCA-LA). Moreover, we combine DCA-LA with a BS ON-OFF switching algorithm in order to improve the energy efficiency of the system. In particular, the proposed DCA-LA/ON-OFF switching algorithm is self-organizing and performs in a fully distributed manner. Simulation results indicate that our proposed algorithm balances load among BSs and yields better performance in terms of average energy consumption, average load, average utility per BS and average rate per user, compared to the baseline algorithms.