The move was made to keep vagrants away from the thousands of people who turned up to attend the temple fair in Nanchang, Jiangxi province.
The fair, which combines a religious holy day, market and funfair, has become a meeting ground for people who are having a hard time and are looking for handouts.
However, the cages have angered human rights campaigners in China, who have compared them to a human zoo.
One campaigner said: "They are treating them like zoo animals. What will they have to do next - tricks for their food?"
A spokesperson for the festival organisers said: "This year we decided we would no longer accept beggars wandering everywhere, distressing our guests and spoiling it for everyone else.
"The beggars are quite comfortable in their cages, people send them food and water as gifts.
"They can leave whenever they like but they have to leave the city too, they can't go into the fair."