While I agree that you are giving very few details, from my point of view, there is a clear cut answer. No, it's not fair.
Detention is a punishment in itself, given by the school. Ergo, you are punishing him for being punished, and that's absolutely not fair in my book.
If your child has trouble at school, then you should try to help him overcome this trouble in the first place. Punishment is one of the approaches used for this. So, if there is an indication that by punishing him, you will solve his problem, then grounding might in theory be the correct way to go about it.
Although I know almost nothing about the situation, I'd say it's more likely that punishment won't work. Why? Because the school already did it, by putting him in detention. And whatever the original problem was, it did not go away by punishment. So, the likeliest answer here is that punishment is not the solution, and adding more punishment will not help.
But even if you think that there is a chance that the punishment will somehow help him (a view which I don't share), then you should be grounding him for the original problem. Grounding him for getting a detention is simply cruel and makes no sense at all.