"These attacks are committed by lone wolves but they are at the same time connected, because they use each other as inspiration and they refer to each other in the different manifestos and I think we have to fight terrorism in many different ways," Stoltenberg told national broadcaster TVNZ while on a visit to Al Noor mosque, one of the two in the city where the attacks took place on March 15.
Australian Brenton Tarrant was later charged with the killings. He is due to reappear in court next week.
The NATO chief laid a wreath at Al Noor Mosque to express his "solidarity" and "sympathy" to the victims and all involved.
Stoltenberg, who was the Prime Minister of Norway when a far-right terrorist Anders Breivik killed 77 people in 2011, said that these cases and the latest shootings in the US which killed 29 people, indicate that different forms of terrorism require different tools.
"Partly it's about the police, security, intelligence, NATO has a role to play, but it's also very much about attitudes, values, that we all stand up for our open and free society for tolerance," he told TVNZ.
"We see that many of the terrorists, they are actually one of us, they are homegrown, they are coming from our own societies and therefore this is also very much about addressing the root causes of terrorism," he added.
Tarrant mentioned Breivik in a manifesto he published online before the attack.
The NATO chief is on a two-day visit to New Zealand, which is to conclude on Tuesday with a meeting with Prime Minister Jacinda Ardern in Wellington, before leaving for Australia where he is to sign an enhanced partnership plan with Canberra.
( With inputs from IANS )