Answer: The mast looks like it imprisons the moon, like the British imprison the colonists.
In this passage, the "phantom ship" is described. The text states that the mast and spar of the ship look as if they were imprisoning the moon. Therefore, the author compares this to a "prison-bar." It is possible that this is a reference to the way the British imprison the colonists.
The mast looks like it imprisons the moon, like the British imprison the colonists. The lines themselves say that the phantom ship crosses the moon with each mast and spar.