Hauff was born in Stuttgart, the son of August Friedrich Hauff, a secretary in the ministry of foreign affairs, and Hedwig Wilhelmine Elsaesser Hauff.
Young Hauff lost his father when he was seven years old, and his early education was practically self-gained in the library of his maternal grandfather at Tübingen, where his mother had moved after the death of her husband.