The 62-year-old man, surnamed Fan, was arrested Saturday night after he killed four colleagues, a driver and a barracks guard, China's Xinhua news agency reported.
Shanghai government said on its microblog account that Fan beat one of his co-workers to death with tools at a chemical factory over a dispute about money. He then allegedly used his hunting rifle to kill the other victims.
Police are still investigating the incident.
Notable deaths of 2014 [PHOTOS]