This paper deals with designing of nanogenerators and its implementation in rails. This adds a new dimension in generation of electricity using nanotechnology. We use array of zinc oxide to produce electricity. Around 0.7 watts of electricity can be produced by 1cubic cm layer of nanogenerators using silicon. While more with GaAs substrate but higher cost sanction us to go with Silicon, the abundant material in nature .Hence with 10 kilometer of rail we can produce 1.02 MW after considering losses. Use of nanotechnology ensures that there will be no degradation in strength of steel of which rails are made. Hence it also fulfills the safety criteria.