The incident took place last evening in the village of Wurenlingen, canton of Aargau, a German-speaking town of some 4,500 people, which is located about 30km northwest of Zurich.
"We have ruled out a terrorist angle," Aargau canton police chief Michael Leupold said at a news conference and added that the shooting was linked to a personal conflict.
All those killed were Swiss nationals, he said.
Local media reports described the shooter as a policeman and a father of three.
Also Read
The police spokesman said the shooter, who has not been named, first went to a house in the residential area and fired on three people, killing his in-laws -- a 58-year-old man and his 57-year-old wife -- and his 32-year-old brother-in-law.
The shooter then went to another house and shot dead a 46-year-old neighbour before fatally turning the gun on himself.
Police found bodies lying inside and outside the residential building overnight.
Neighbours in Wurenlingen alerted police late yesterday after hearing several gunshots ring out in the area.
A spate of shootings have taken place in Switzerland in the recent years attributed to "family dramas".
In a shooting incident in August, 2013, a man shot dead his wife before killing himself in Zurich only a few blocks away from the latest firing incident.
In October, 2014, a son killed his parents in Zurich while on November 3 same year, the last such incident happened in the town of Wilderswill, in the canton of Bern, where three people were killed in a domestic dispute.
According to the Small Arms Survey 2007, Switzerland has the third highest average arms per 100 people after the US and Yemen -- 45.7 people have guns out of 100 people and an average of 3.4 million people out of the total population of 8 million own a firearm.