Theresa Villiers made the comments in a speech about legacy issues at Ulster University on Thursday.
She defended the government's approach to dealing with the legacy of the Troubles in Northern Ireland.
She said that it was a 'distortion' to suggest that misconduct by security force members in the past was endemic.
Families of people killed by state forces fear the government will use the issue of national security to block the release of information on the killings.
When Northern Ireland's latest political agreement, known as the Fresh Start document, was agreed in November one key element remained unresolved - how to deal with the legacy of the Troubles.
The secretary of state suggested that, when it comes to the legacy of the troubles, some people are pursuing "a pernicious counter narrative of the past".
She added: "It is a version of the Troubles that seeks to displace responsibility from the people who perpetrated acts of terrorism and place the state at the heart of nearly every atrocity and murder that took place."
Paying tribute to the work of police officers and soldiers, she said: "I am convinced that in the vast, vast majority of cases they carried out their duties with exemplary professionalism."
However, she nonetheless admitted that some "fell below the high standards required of them".
"Sadly we know that there are some truly shocking instances where they fell drastically short of those standards," she said.
"And like the Prime Minister, I will never seek to defend the security forces by defending the indefensible.
"Where there is evidence of wrongdoing it will be pursued. Everyone is subject to the rule of law.
"Yet we need to be mindful of the context in which the security forces were operating.
Ms Villiers said that everything will be disclosed to the planned new Historical Investigations Unit.
However, she said the government has legitimate concerns about what that unit might then make public - either because it could put lives at risk or compromise the security services' capabilities.
"There are techniques and capabilities available to our security services that, if known, would be of value to terrorists.
"That's not just violent dissidents in Northern Ireland, but also Islamist terrorists who want to attack our whole way of life.
"No responsible government could allow this to happen and we must retain the power to prevent it."
Last month a senior judge criticised the government's attitude to Troubles inquests, saying they were very low on the Ministry of Defence's list of priorities.
But in her address, Ms Villiers denied there was a lack of commitment by the government or the police, insisting that the current system was never designed to cope with such a large number of complex sensitive cases.
She said she remained hopeful that a political agreement over legacy issues could be reached but said it was important that the past was seen in context.

A total of 106 people donated organs in hospitals across Scotland last year compared with 54 in 2007.
The statistics showed a 62% increase in organ transplants from deceased donors, with 341 operations carried out.
However, about 600 people remain on the transplant waiting list.
Some 2,110,881 people living in Scotland have now joined the UK Organ Donor Register.
The figure means 40% of the Scottish population has registered, compared to 32% across the UK as a whole.
Public Health Minister Michael Matheson said: "First and foremost I want to offer my thanks to every donor and every donor's family in Scotland who have demonstrated such kindness and benevolence in the face of tragic and difficult circumstances.
"It is our responsibility to ensure that people's organ donation wishes are respected and to ensure that we make every donation count."
Mr Matheson added: "It's important to remember, however, that around 600 people in Scotland are still waiting for an organ and we must be doing all we can to give them hope."
Peter McGeehan, 64, from Dunfermline, suffered serious heart failure and was listed for a transplant in 2004. In the ten years since a heart transplant, the father-of-two said he has thought about his donor every day.
He said: "People take living for granted, but as I approach the ten-year anniversary I can honestly say there's never a day where I've woken up and haven't thought about my unnamed donor."
Northern Ireland's secretary of state has warned that dissident republicans and Islamist militants should not be shown how UK security services work.
[NEXT_CONCEPT]
The number of people who donated their organs after death in Scotland has almost doubled over a six-year period, according to government figures.