Did you get him from a pet store? That is a problem with dogs from pet stores because they were kept in crates or cages. Try feeding him in his crate for a couple of days - at least a week. He may come to see the crate as his place for food rewards and dogs don't like to use the bathroom where they each. Good luck! Keep us posted on how it goes