1. Soak the beans overnight in the refrigerator in enough cold water to cover by 4 inches. Drain them well.
2. Combine the beans, ham hocks, onion, salt, pepper, sugar, and garlic in a large saucepot. Cover with water and bring to a boil. Reduce the heat to simmering and cook, covered, until the bean are tender, about 45 minutes. Check the seasoning and serve the beans hot.