Drain and place the beans in a large pot with the ham hock and water. Bring to a boil, then reduce heat and simmer for about 3 hours, or until beans are tender.
In a skillet, melt butter over medium heat and sauté onion and garlic until translucent. Add to the soup pot. Remove the ham hock, shred the meat, and return the meat to the pot. Season with salt and pepper to taste.