Police spokeswoman Lisa-Marie Brooks said a police dog unit apprehended 48-year-old John Tully near a lake after an extensive manhunt in the South Island town of Ashburton.
She said Mr Tully would be treated for minor dog-bite injuries and police were still searching for the weapon used in the shootings. A decision on whether to press charges would probably be made today.
Earlier, officers urged residents to remain inside their homes as they searched an area near the town's river and stormed a house that turned out to be empty.
Mr Tully, who was homeless, had been interviewed in recent weeks by the local newspaper about his struggles to find somewhere to live. He had also written to politicians.
Police said the incident began when a man entered a Work and Income New Zealand office and started shooting.
A witness said the man was wearing a black balaclava and shot at two women. Other witnesses said the man was carrying a shotgun that may have been sawed down and fled on a bicycle.
Ministry of Social Development chief executive Brendan Boyle said all three shooting victims worked for the agency. He added that staff were devastated.