In recent years Wireless sensor networks (WSNs) play a vital role in various real time application, by collecting a huge amount of various sensory data from the field. The routing protocol for wireless sensor networks mainly aims in the energy-efficiency of the network. Due to restricted energy, memory, transmission range, power and high traffic load, the nodes which act as a sink get depleted quickly. Because of these so many approaches proposed over past years to reduce energy consumption and to prolong network lifetime. Energy consumption of the network can be reduced by means of using the mobile sink and it also reduces the hotspot problem. Hence Virtual Grid based Data Gathering technique using mobile agent (VGDG-MA) for WSN with mobile sink is proposed. Mobile agent is the one which is used to collect the data by flexibly planning its route. In this paper, virtual grid based data gathering technique using mobile agent is presented that mainly aims to reduce the route construction path frequently in a grid structure. Mobile agent is placed in a multihop environment which automatically clones and migrates based on the environmental changes. Instead of mobile sink, these mobile agents migrate in the environment and collect data, clone when it leaves the particular node results in energy consumption and also reduce the construction cost of the network. Based on residual energy of the node, sink relocates its position and avoids network failure. Proposed method shows that mobile agent can powerfully transfer data from sink to source and source to which results in energy consumption, good packet delivery ratio. Simulation results shows that the proposed VGDG-MA increases the network lifetime and gives better results in terms of energy consumption, packet delivery ratio and throughput when compared with other protocols. Simulation is carried out in OMNeT++. © 2017 IEEE.