To solve the problem of pollutant source localization in an indoor environment with dynamic mechanical ventilation better, this paper designed and built a 3D source localization system composed of three 3D source localization robots whose sensors can move under control in the height direction (0.5 m–1.5 m). Through adopting the 3D source localization system, we realized the application of the previously developed the improved whale optimization algorithm (IWOA) method in 3D source localization and proposed the 3D_IWOA method. To validate the feasibility of the 3D_IWOA method and compare the performance of the 3D_IWOA method and other three 3D source localization methods (the 3D_SPSO, 3D_WUⅡ, and 3D_IPSO methods), each method repeated 15 independent experiments in a Training-Center under the same conditions, respectively. For locating the periodic source at a height of 1.05 m in the downwind zone of this environment, the numbers of successful experiments of the 3D_SPSO, 3D_WUⅡ, 3D_IPSO, and 3D_IWOA methods were 5, 6, 11, and 13 (the success rates were 33.3%, 40.0%, 73.3%, and 86.7%), respectively. In addition, the means of total steps of the 3D_SPSO, 3D_WUⅡ, 3D_IPSO, and 3D_IWOA methods were 36.29 steps, 35.96 steps, 31.75 steps, and 38.15 steps, respectively.