In the current circumstance, the Web Service Composition (WSC) was introduced to address complex user needs concerning the Quality of Services (QoS). In the WSC problem, the user needs are divided into a set of tasks. The corresponding web services are retrieved from the web services discovery according to the functionality of each task, and have different non-functional constraints, such as QoS. The WSC problem is a multi-objective optimization problem and is classified as an NP-hard problem. The whale optimization algorithm (WOA) is proven to solve complex multi-objective optimization problems, and it has the advantage of easy implementation with few control parameters. In this work, we contribute to improving the WOA algorithm, where different strategies are introduced to enhance its performance and address its shortcomings, namely its slow convergence speed, which produces low solution accuracy for the WSC problem. The proposed algorithm is named Improved Whale Optimization Algorithm (IWOA) and has three different strategies to enhance the performance of the WOA. Firstly, the Sine chaos theory is proposed to initiate the WOA’s population and enhance the initialization diversity. Secondly, a Lévy flight mechanism is proposed to enhance the exploitation and exploration of WOA by maintaining the whales’ diversity. Further, a neighborhood search mechanism is introduced to address the trade-off between exploration and exploitation searching mechanisms. Different experiments are conducted with datasets on 12 different scales (small, medium, and large), and the proposed algorithm is compared with standard WOA and five state-of-the-art swarm-based algorithms on 30 different independent runs. Furthermore, four evaluation criteria are used to validate the comparison: the average fitness value, best fitness values, standard deviation, and average execution time. The results show that the IWOA enhanced the WOA algorithm’s performance, where it got the better average and best fitness values with a low variation on all datasets. However, it ranked second regarding average execution time after the WOA, and sometimes third after the WOA and OABC, which is reasonable because of the proposed strategies.