Police were called to an address in Maybridge Crescent, Goring, West Sussex, at just before midnight following a report that a man known to the occupants was breaking in and was in possession of a handgun, the spokesman said.
Officers contained the address and helped the occupants, two women and four children, as they came out of the house safely shortly afterwards, police said.
The two women had sustained minor cuts but did not need hospital treatment, according to police.
Arrangements were made for several residents from surrounding addresses to be temporarily accommodated at a local police station for their own safety, the spokesman said.
The man remained in the house and police established communication and dialogue with him, although at that stage he would not come out, police said.
However officers remained in patient contact with him and at 3.48am he came to the door, according to police.
He would not comply with officers' instructions and it was necessary to discharge a taser device in order to help ensure his safe arrest, the spokesman said.
The man was arrested on suspicion of burglary and after being taken to Worthing Hospital for a medical assessment, is now in police custody for interview and further enquiries, confirmed police.
He is being further arrested on suspicion of assault and firearms offences, police said.
The weapon was found to be an imitation handgun and several knives have been recovered from the address, confirmed police.
Chief Inspector Miles Ockwell, District Commander for Adur and Worthing, said: "This was a very serious incident.
"Our priority was to ensure the safety of those at risk and we managed to do so while also minimising the level of harm to the man involved, who can now be dealt with through the Criminal Justice system.
"We thank people living nearby for their patience and understanding for the disturbance caused while we resolved this incident safely."