Wireless Body Area Network (WBAN) is a promising cost-effective technology for the privacy confined military applications and healthcare applications like remote health monitoring, telemedicine, and e-health services. The use of a Software-Defined Network (SDN) approach improves the control and management processes of the complex structured WBANs and also provides higher flexibility and dynamic network structure. To seamless routing performance in SDN-based WBAN, the energy-efficiency problems must be tackled effectively. The main contribution of this paper is to develop a novel Energy Optimized Congestion Control based on Temperature Aware Routing Algorithm (EOCC-TARA) using Enhanced Multi-objective Spider Monkey Optimization (EMSMO) for SDN-based WBAN. This algorithm overcomes the vital challenges, namely energy-efficiency, congestion-free communication, and reducing adverse thermal effects in WBAN routing. First, the proposed EOCC-TARA routing algorithm considers the effects of temperature due to the thermal dissipation of sensor nodes and formulates a strategy to adaptively select the forwarding nodes based on temperature and energy. Then the congestion avoidance concept is added with the energy-efficiency, link reliability, and path loss for modeling the cost function based on which the EMSMO provides the optimal routing. Simulations were performed, and the evaluation results showed that the proposed EOCC-TARA routing algorithm has superior performance than the traditional routing approaches in terms of energy consumption, network lifetime, throughput, temperature control, congestion overhead, delay, and successful transmission rate.