In order to extend the network lifetime in wireless sensor network, A Routing Protocol Based On The Location Of Grid In WSN(RPLG) was presented. Whole network is divided into some virtual grids and sensor nodes in each gird form a cluster respectively. The cluster head was chosen by the node's location in gird and residual energy. In order to save network energy, cluster members can adjust cluster size according to local information. Simulation results show the proposed routing protocol effectively balances the energy consumption for sensor nodes in wireless sensor networks and significantly prolongs wireless sensor networks lifetime.