An improved whale optimization algorithm is proposed to solve the problems of the original algorithm in indoor robot path planning, which has slow convergence speed, poor path finding ability, low efficiency, and is easily prone to falling into the local shortest path problem. First, an improved logistic chaotic mapping is applied to enrich the initial population of whales and improve the global search capability of the algorithm. Second, a nonlinear convergence factor is introduced, and the equilibrium parameter A is changed to balance the global and local search capabilities of the algorithm and improve the search efficiency. Finally, the fused Corsi variance and weighting strategy perturbs the location of the whales to improve the path quality. The improved logical whale optimization algorithm (ILWOA) is compared with the WOA and four other improved whale optimization algorithms through eight test functions and three raster map environments for experiments. The results show that ILWOA has better convergence and merit-seeking ability in the test function. In the path planning experiments, the results are better than other algorithms when comparing three evaluation criteria, which verifies that the path quality, merit-seeking ability, and robustness of ILWOA in path planning are improved.