This idiom means pretty much the same as "a hidden agenda."
If we are suspicious that George has a hidden agenda relative to a certain issue, we could ask him, "Do you have an axe to grind?" Or, "Do you have a dog in this fight?"
He could deny it: "I have no axe to grind here."
Slightly different: I think he came here with an axe to grind.