Sort through the dried beans and discard any stones or damaged beans. Rinse well under cool running water.
Add the beans, ham hocks, onion, salt, and pepper to a large slow cooker. Pour in enough water to cover the beans by about 2 inches, approximately 6 to 8 cups.
Cover and cook on High for 2 hours. Reduce the slow cooker to Low and continue cooking for 4 to 5 hours, until the beans are tender and the ham is easy to pull from the bone.
Remove the ham hocks. When cool enough to handle, remove the meat and discard the bones, skin, and excess fat. Chop or shred the meat and return it to the slow cooker.
If the soup is thinner than desired, remove about 1 cup of cooking liquid. Stir in the brown sugar, taste, and adjust the salt and pepper.
Cook for another 10 minutes, then ladle into bowls and serve hot.