At least 180,000 people were displaced from their homes in the Ning'er county of Pu'er city in Yunnan, where an earthquake measuring 6.4 on the Richter Scale killed three and affected one million residents early on Sunday.
Walking among the broken walls, Wen visited a tent which is now home to a family of a local villager Xu Guangrong.
Xu told the Premier that the local government had delivered disaster-relief materials to his family such as water, rice, quilts and candles.
The Xinping primary school was heavily damaged in the earthquake and the teachers have erected tents to serve as makeshift classrooms.
"The earthquake has destroyed our houses, it, however, will not destroy our willpower," Wen said to the students when he visited one of the tents. He encouraged them to be courageous and study hard in order to "build a more beautiful homeland".
Wen spent more than an hour visiting rows of tents which are serving as temporary housing.
Wen said the government would speed up damage assessment, building planning and reconstruction of housing so residents can return home as soon as possible.
"We must achieve this goal and we are able to achieve it," Wen said.
The core of the disaster relief is the reconstruction of houses,Wen said, adding that the government must get all the quake-affected residents back into houses before the Spring Festival which falls in February next year.
Official statistics show one million residents in 224,000 households were affected in the quake in Pu'er City. About 360,000 houses were damaged, of which 90,000 collapsed and 120,000 were seriously damaged.
Wen also asked local authorities to restore infrastructure including water, electricity and communications as soon as possible and to guarantee the smooth running of the national college entrance exam that kicks off Thursday.