Consuming animals by slaughtering vs injecting barbiturates?
For many drugs, the animal cannot be slaughtered for consumption within a certain time. Here are the slaughter withdrawal periods for some common drugs when used on cattle. There are also withdrawal periods for lactating dairy cattle, but I won't list them for brevity. 


flunixin (NSAID) - 6 days
florfenicol (antibiotic) - 36 days intramuscular, 55 days subcutaneous
penicillin G procaine (antibiotic) - 10-14 days
tilmicosin (antibiotic) - 28 days
oxytetracycline (antibiotic) - 28 days intramuscular, 48 days subcutaneous
enrofloxacin (antibiotic) - 36 days, do not use in veal calves


More importantly for your question, I have found this report on pentobarbital used for euthanizing cattle. It says:


  Adequate measures should be taken to ensure that carcasses of animals treated with this product and the by-products of these animals do not enter the food chain and are not used for human or animal consumption.


Barbiturates are more dangerous than many other drugs and, furthermore, dead animals cannot metabolize them and they can be quite heat stable (ie won't readily decompose during cooking).