Yes, he had the right do do it. That is not the problem.
However, he had staunchly denied he would ever do it, until he did it anyway. That's called lying, and in the light of his own past criticism of some anticipated Trump's pardons which have never been actually issued, it's also extreme hypocrisy. That's the problem.