The huge explosion on Sunday in Hebei Province's Ningjin County killed 18 people in the warehouse.
Three more, who were working at nearby factories at the time of the blast, died in a hospital.
Another 25 people were injured, with two of them still in serious conditions.
The explosion was so powerful that it shattered glass windows of a nearby residential building, and of even those of a flour factory about a kilometre away from the warehouse.
More From This Section
The villager, who is now in police custody, sublet the premises on July 1 to another villager, who recruited workers for illegal production of firecrackers.
The blast killed all the recruits, state-run Xinhua news agency reported.
More than 600 police officers and firefighters and 280 vehicles, including 30 fire trucks, were dispatched to the scene. Six ambulances and 17 medical workers participated in the rescue work.
China is the world's largest producer of fireworks.