In this paper, we present an effective navigation control method for mobile robots in an unknown environment. The proposed behavior manager (BM) switches between two behavioral control patterns, wall-following behavior (WFB) and toward-goal behavior (TGB), on the basis of the relationship between the mobile robot and the unknown environment. A type-2 neural fuzzy controller (T2NFC) with an improved whale optimization algorithm (IWOA) is proposed to provide WFB control and obstacle avoidance for mobile robots. In the WFB learning process, the input signal of a controller is the distance between the wall and the sonar sensors, and its output signal is the speed of two wheels of a mobile robot. A fitness function, which operates on the total distance traveled by the mobile robot, distance from the side wall, angle to the side wall, and moving speed, evaluates the WFB performance of the mobile robot. Experimental results reveal that the proposed IWOA is superior to other methods of WFB and navigation control.