In energy-harvesting wireless sensor network (EHWSNs), sensor nodes (SNs) are rechargeable. But, the harvesting techniques used for recharging SNs’ are dynamic and may not provide evenly harvested energy to all sensors. Thus, maximizing quality data-collection (MQDC) is an interesting issue under energy harvesting constraints. In this article, we focus on this issue to solve. We consider a mobile-sink (MS) that moves on a constrained-path for collecting SNs’ data periodically. The SNs are distributed nearby the constrained-path. This scenario may exist in various real-world applications, such as traffic monitoring, environment monitoring and health monitoring of large buildings or bridges, etc. We transform the MQDC problem into a network-utility maximization problem. We then prove that the converted problem is an NP-hard. Thereafter, we develop a heuristic algorithm, referred to as Maximizing Quality Datacollection using Constrained-path Mobile-Sink (MQDCPMS), to solve it. We address the effect of change in the speed of MS on the quality data-collection. Finally, through extensive simulations, we find that the MQDCPMS algorithm maximizes the quality data-collection comparatively better than other baseline algorithms.