1. After 10 days, the dogs will be put to sleep.

2. In 10 days, the dogs will be put to sleep.

(Are both grammatical? Do we have to use 'in' or 'after' in this case? Do they have the same meaning?)

In this case, they both mean the same thing. Again, "after" means sometime after the elapse of ten days. "In ten days" is more definite, but both mean roughly the same thing. The dog pound will wait ten days for someone to claim the dog or adopt it, then put it to sleep if no one does so.

Both are grammatically correct.