This paper describes a novel hybrid technique with fractional order PID controller (FOPID) for simultaneously controlling the humidity of indoor air temperature and the direct expansion (DX) air conditioning (A/C) system. The proposed hybrid system is a joint performance of the butterfly optimization algorithm (BOA) and adaptive network fuzzy inference system (ANFIS), hence forth it is called BOANFIS Technique (BOANFIST). The purpose of the proposed system is to disconnect the temperature and humidity control circuits. The proposed control is modeled and replicated on MATLAB platform and is assessed using existing systems. The statistical performance of the proposed and existing systems of mean, median and standard deviation is also evaluated. It reduces computational time up to 1.01 s and also reduces energy consumption to around 16.42 KWh/day. Furthermore, the simulation outcomes suggest that the proposed technique may efficiently and accurately obtain the optimal global solutions of the proposed technique compared to existing systems.