These were times of political repression and he was twice imprisoned on charges of sedition. The first occasion was in 1795, for printing a poem to celebrate the fall of the Bastille in revolutionary France. The second, in 1796, was for criticising a magistrate who had forcibly dispersed a political protest in Sheffield. Turning his experience of gaol to some profit, he afterwards published a pamphlet of poems written during his captivity: "Prison Amusements" (1797). His later prose account of the episode was published in 1840.