This may be a toxic reaction to the type of poison you used for the heartworms.
You can read about toxic reactions here
As you can see on this site
Dose is 0.0015 to 0.003 mg per pound
Endo-mectin has about .07mg per ml. (a cc=ml)
I'd suggest that you see a vet with him and bring along the container of product you used and the measuring syringe so they can see how much he got.
I'd plan on seeing a vet with him.
Hope this helps you!