The landslide tore through the town of Lueyang in Shaanxi province on Tuesday, engulfing 12 houses, the county government said in a statement.
Rescuers pulled out 20 people, most of whom had been killed on the spot. One of the victims died in hospital, the government said.
The national meteorological centre warned on Wednesday that rainfall in the area would continue, and asked local authorities to try and implement disaster-prevention measures to avoid further casualties.
It added that the southwestern province of Sichuan, which has also been hit hard by summer downpours, would see more heavy rain.
A photo in the official China Daily newspaper showed a bridge in Sichuan's Wenchuan county cut in half by a mudslide, and people standing on the remaining section of the structure as muddy water raged past on either side.
China is annually hit by big summer rainfalls. Last year, they triggered the nation's worst flooding in a decade, leaving more than 4,300 people dead or missing in floods, landslides and other rain-related disasters.
One devastating mudslide in the northwestern province of Gansu killed 1,500 people last August.
The Ministry of Civil Affairs said last Friday that 279 people had died in China in natural disasters in June alone - a large portion of which were killed by rain-triggered accidents such as floods and mudslides.