In order to guarantee a successful data collection process in wireless sensor networks with mobile sinks (WSN-MS), two primary objectives must be reached: 1) enabling the mobile sink to retrieve the maximum amount of data and 2) making sure that the network operates as long as possible. The first problem has been solved previously by proposing an innovative solution HXMAC. To address the second problem, on which this paper focuses, ambient energy harvesting is used to continuously supply power to each sensor node. Thus, this paper's main contribution is to propose EH-HXMAC (HXMAC with energy harvesting), which is based on all these improvements: seamless handover, duty cycling optimization, and mainly energy harvesting capability. EH-HXMAC has been evaluated using Cooja Contiki simulator. Obtained results based on the evaluation of the proposal EH-HXMAC clearly show its suitability as a good solution to promote unlimited lifetime for WSN-MS.