The improvement of positioning accuracy in Wireless Sensor Networks (hereafter, WSN) is crucial to develop advanced Internet of Things (IOT, for short) applications. However, the conventional distance vector-hop (DV-Hop) localization algorithm has shortcomings such as low accuracy and weak stability. To overcome these shortcomings, this paper proposes a hybrid improved compressed particle swarm optimization algorithm (HICPSO), which consists of a scheme of linearly decreasing inertia weights, compressed velocity vectors, population Gaussian variants and optimal boundary selection. Then, HICPSO is integrated with DV-Hop to gradually reduce the distance error of least squares method (LSM) estimated with the efficient search advantage of HICPSO. Our simulation results show that the HICPSO algorithm possesses better computational accuracy and search performance on the 22 benchmark test functions compared with the algorithms such as the Improved Adaptive Genetic Algorithm (IAGA) and Adaptive Weighted Particle Swarm Optimizer (AWPSO). Meanwhile, compared with IAGA and AWPSO, the positioning accuracy of HICPSO-based positioning algorithm is improved by 4.28% and 4.76% respectively, and the stability is improved by one order of magnitude.