Yes, you have to take it as an Accident on Duty. The compensation/treatment has to be handled by the employer or the ESI department (if applicable). In the amendment made in 2010 to the ESI Act, Section 51-E has been inserted.
Accidents Happening While Commuting to the Place of Work and Vice Versa
An accident occurring to an employee while commuting from his residence to the place of employment for duty, or from the place of employment to his residence after performing duty, shall be deemed to have arisen out of and in the course of employment if a nexus between the circumstances, time, and place in which the accident occurred and the employment is established.