It comes from the American police show Hawaii Five-O; "five-o" has since become a slang term for police. In the show, "Five-O" is just a police unit, but the name itself doesn't really mean anything other than a designation (I believe the writers named it "Five-O" in homage to Hawaii, the 50th US state and the location of the show).
A wheelbarrow is a smallish, open-topped, hand-propelled vehicle for the conveyance of bulky loads.
A frog is a small animal renowned for its jumping ability.
The frog is generally a very placid animal, but will jump to safety at the slightest provocation. If you place a bunch of frogs into a wheelbarrow in order to transfer the frogs from one place to another, then in order to arrive at your destination with any frogs left, you will have to be exceedingly careful not to bump, startle, or disturb the frogs in any way. And a wheelbarrow is not known for the smoothness of its ride, so your task is made all the more difficult by the choice of vehicle.
So the idea behind the idiom is that you have a task which is theoretically possible, but practical considerations render it either entirely unfeasible, or at the very least extremely difficult.
The idea of herding cats is very similar.
(I found one indication that the phrase is originally a "dutch metaphor", but no reliable source for that, so I'll let someone else dig into that side of things.)
Best Answer
You are right that it would mean something like "in an empire into an empire", which is nonsense; fortunately, this phrase is wrong: the classic term is imperium in imperio, which is, as Alex explained, an "empire within an empire", a group or organisation that functions almost as its own state, even though it is officially not a state but merely an unofficial entity within a state. The use of the word "imperium" instead of a more neutral word meaning a commonwealth, like "res publica", implies that the leader(s) of this entity impose some rules on it that would normally be imposed by a formal government.