Investigators say Dmitry Vinogradov also wounded another two people at the pharmaceutical firm where he worked.
The 30-year-old is now in police custody.
He had reportedly been drinking for five days and had declared his hatred for humankind in an online posting.
"The suspect came into the office... and fired numerous shots from Saiga and Benelli shotguns that he owns," Russian investigators were quoted as saying in a statement by the AFP news agency.
"As a result, three men and two young women sitting at their desks died on the spot. One more man and another young woman were wounded," the statement added.
The suspect - who was dressed in camouflage gear - is believed to have fired shots from the two guns simultaneously.
Reports say that the woman he was in love with was injured in the shooting.
Mr Vinogradov had posted on one of Russia's most popular social networks before the shooting, Russia's news agencies say.
"I hate human society and being part of it disgusts me! I hate the meaningless of human life!" Mr Vinogradov is believed to have written.
"I hate the life itself. I see only one way to justify it: to eliminate as many particles of human compost as possible."
He is now being questioned by the police, and reports say he will undergo a psychological evaluation.