A 26-year-old Snake Valley man, known to police, had allegedly carjacked the woman in the western Victorian town about 2.30pm on Tuesday.
He led air police on a chase to Melton in Melbourne's outer west where he got out and unsuccessfully attempted to carjack another vehicle.
The man was tracked to the neighbouring suburb of Weir Views where he was confronted by officers out patrolling for him.
He allegedly fired a shot from a high-powered rifle at police but did not injure them.
The offender then broke into a house on Leon Drive occupied by a father and his one-year-old, and held them inside for two-and-a-half hours.
Special Operations Group and the critical incident response team negotiated with the offender while communicating with the father, Victoria Police Superintendent Michael Cruse said.
"Throughout the negotiations, we attempted for him to surrender and put the firearm down," he told reporters on Wednesday.
"We provided safe passage for that to occur. That did not occur prior to the incident unfolding."
The man allegedly fired a shot from a high-powered rifle at police but did not injure them. (Supplied by 9news/AAP PHOTOS)
Officers were able to negotiate for the male victim to get out of the house through the front window just after 6pm.
As the rescue was happening, another shot was fired inside the home, leading police to enter.
It is alleged the man then fired a shot at officers, and they returned fire.
"(Officers) were able to deploy a police dog, and the male offender was taken down and arrested," Supt Cruse said.
"It's extremely lucky (that no officers were injured), and the offending is very serious, and it's completely unacceptable that police members were exposed to this kind of danger."
Asked about reports the man was in the backyard jumping on a trampoline before police intervened, Supt Cruse said there was a period of time where he was behaving erratically.
The man remains at the Royal Melbourne Hospital after being treated for a dog bite, with police expecting him to be discharged on Wednesday afternoon when he will be interviewed and charged.
As the rescue was happening, another shot was fired inside the home, leading police to enter. (Supplied by 9news/AAP PHOTOS)
Police are supporting the victims who were uninjured in the incidents.
"Investigators will make sure they get referrals and they're OK, but undoubtedly, it is a terrifying incident - very, very traumatic - and we'll need to support them through this," Supt Cruse said.
The man will potentially face a raft of charges including aggravated carjacking, attempted aggravated carjacking, aggravated burglary, conduct endangering life, and firearms offences.