From the
Etymology Dictionary
c.1700, originally, "person hired to do routine work," short for hackney "an ordinary horse" (c.1300), probably from place name Hackney (Middlesex), from O.E. Hacan ieg "Haca's Isle" (or possibly "Hook Island"). Now well within London, it was once pastoral.