Rinse beans. In a large saucepan combine beans and 4 cups water. Bring to boiling; reduce heat. Simmer for 2 minutes. Remove from heat. Cover and let stand for 1 hour. (Or, skip boiling the water and soak beans overnight in a covered bowl.)
Drain and rinse beans. In the same pan combine beans and 4 cups fresh water. Bring to boiling; reduce heat. Cover and simmer about 1-1/4 hours or until beans are tender, stirring occasionally. Drain beans, reserving liquid.
In a 1-quart casserole combine the beans, ham, and onion. Stir together 1/2 cup of the bean liquid, the tomato sauce, green chilies, brown sugar, chili powder, salt, and mustard. Stir into bean mixture. Bake, covered, in a 325 degree F oven about 1 hour. Uncover and bake about 45 minutes more or to desired consistency, stirring occasionally. Makes 6 side-dish servings.