The game was invented by mathematician John Horton Conway, and named after the Groucho Marx character, Hugo Z. Hackenbush, in the Marx Brothers film "A Day at the Races".
It was described and analysed in: Conway, John Horton. On Numbers and Games. New York: Academic Press, 1976. 165. A fuller analysis was given in: Berlekamp, Elwyn R., John H. Conway, and Richard K. Guy. Winning Ways for your Mathematical Plays - Volume 1. New York: Academic Press, 1982. 183-220.