Sorry your little guy is sick. Unfortunately, there is no possible way for me to know what's wrong. There are a lot of possible causes of these signs. They include the following:
1) Parvo. This is an awful virus that affects unvaccinated dogs. It starts with lethargy and vomiting and progresses to bloody diarrhea. The prognosis without treatment is very poor. This is unlikely if your dog is well vaccinated.
2) Acute gastritis. This usually occurs as a result of the dog getting into something he shouldn't have - stuff from the yard, the garbage, table food, etc. It just throw the system off and makes them feel awful.
3) Foreign body. Sometimes these pups like to eat things that may cause obstruction of the GI tract. This can make them vomit and refuse to eat. They usually have painful abdomens. This is diagnosed on physical exam and x-rays and often requires surgical removal of the offending material.
4) Pancreatitis. This is inflammation of the pancreas and usually affects dogs that are older than yours. It often follows a highly fatty meal. It causes vomiting and abdominal pain and can be very serious.
5) Bacterial overgrowth. Sometimes one particular type of bacteria can overgrow in the intestinal tract at the expense of the other types of bacteria. This can result in signs like you describe. Diagnosis is made on the basis of fecal cytology and is treated with appropriate antibiotics.
A conservative approach to this situation would be to withhold all food for the next 12-18 hours. Only offer water in small amounts every 1-2 hours. Then after a 12-18 hour fast, you can offer a mixture of boiled hamburger and boiled white rice in a 1:2 ratio. Offer the same amount of this as regular food in 24 hours, but spit it up into 5-7 small, frequent meals. You can also give a touch of pepto bismol twice daily (1/4 teaspoon). After 2-4 days of this food, slowly start to add in regular food and change back to regular dog food over a period of 3-4 days.
But, if the dog does not stop vomiting or feels very sick and lethargic without improving, then you need to have him evaluated by your vet. Little guys like this don't have much to fall back on.
Good luck with this. Hope these thoughts help.