Police say a gunman opened fire on the Al-Noor Islamic Centre, in the outskirts of the capital Oslo.
Later a woman was found dead at the house of the suspect, police said.
The suspect "is around 20 years old, a Norwegian citizen from the area," said assistant chief of police Rune Skjold, adding that the man was now suspected of murdering a relative.
"We consider this a suspicious death... The dead person is related to the man arrested earlier today," he said.
Police say the man acted alone when he attacked the mosque.
The mosque's director told local media that the victim was a 75-year-old member of the congregation.
"One of our members has been shot by a white man with a helmet and uniform," Irfan Mushtaq told local newspaper Budstikka.
He later told local channel TV2 that the attacker had "carried two shotgun-like weapons and a pistol. He broke through a glass door and fired shots."
The gunman, who wore body armour, was overpowered by people at the mosque before police arrived at the scene, Mr Mushtaq added.
Police sources told public broadcaster NRK that several weapons were found inside the mosque, located in the town of Baerum, following the shooting.
The mosque had previously implemented extra security measures after a gunman killed 51 people at two mosques in Christchurch, New Zealand, earlier this year, according to Reuters news agency.