Detective Superintendent Nick Wallen said the 61-year-old "stood absolutely no chance whatsoever" when she was attacked in her classroom by teenager Will Cornick (pictured below) as she taught Spanish at Corpus Christi Catholic College, Leeds, in April 2014.
Mr Wallen was giving evidence on the first day of the inquest into Mrs Maguire's death which is due to last two weeks at Wakefield Coroners' Court, in West Yorkshire.
The officer took the jury of six women and five men through the "shocking" events at the school describing how the "slight" and "petite" teacher was "ambushed" by a "strapping 15-year-old lad".
He said she was stabbed seven times with a kitchen knife Cornick had brought from home, including one blow which cut her jugular vein.
Answering questions Mr Wallen agreed that, on the day he killed Mrs Maguire, Cornick told "at least 10 other pupils precisely what he was going to do - where he was going to do it and how he was going to do it".
But the detective said none of the children took him seriously and it was not reported to any staff.
He told the inquest: "He was a young man who was prone to say things that weren't true. That's the reason that, on the day, most people who Will spoke to thought 'That's just Will, that's what he does'."
Mr Wallen told the inquest: "This attack came completely out of the blue. Nobody in the classroom saw this coming."
The officer added: "I would say she stood absolutely no chance whatsoever."
Mr Wallen said Cornick and his family were not known to the police nor any safeguarding agencies before the incident.
He said Facebook messages exchanged with another pupil around Christmas 2013, discovered after the killing, showed a "hatred" for Mrs Maguire and talked about attacking her.
Mr Wallen said the other child involved said he did not believe Cornick's threats were real.
The officer said there was an incident when Cornick stormed out a meeting called to discuss his work in Spanish, involving Mrs Maguire, when she had argued that he should not be allowed to drop the subject.
He said this followed an incident in which Mrs Maguire had put him in detention rather than go on a bowling trip, but he went on the trip anyway.
But Mr Wallen said this incident was similar to many which happen in schools around the country and added: "Is it a warning that this individual was about to kill his teacher? My answer to that would be 'no'."
The detective told the court: "We spoke to his teachers and his parents and at no time did we have the impression of a disruptive, violent, angry individual who there was an sense was about to explode in a frenzy of violence such as this."
The detective said: "I absolutely am of the view that there is one person responsible for Ann Maguire's death - that is William Cornick.
"He has pleaded guilty at the crown court to Ann's murder.
"And nothing in the days and weeks proceeding the murder could have given anyone at the school, the police, his family, any idea whatsoever that anything of this sheer horror was about to take place."
Mr Wallen said he believed airport-style security was not a proportionate response in a school like Corpus Christi.
The jury heard how Cornick pleaded guilty to murder and was sentenced to life in prison with a minimum tariff of 20 years.
Nick Armstrong, representing Mrs Maguire's husband, Don, and their four children, asked the detective if he was aware that Cornick listened to the track Jungle Boogie in lessons.
Mr Armstrong said this was the theme to the 1994 Quentin Tarantino film Pulp Fiction, which Mr Armstrong described as a "killing spree movie".
Mr Wallen said he was not aware of this.
Mr Armstrong also asked the detective if he was aware that Cornick played violent video games such as Assassin's Creed.
Mr Wallen said playing Assassin's Creed was not unusual and thousands of children around Britain played the game.
Mr Armstrong asked the officer about how Cornick told other children what he was going to do on the day of the murder and even showed some at least part of the knife, which Mr Wallen called a "vicious looking thing".
He asked the officer if he was surprised that one of the boys did not report what he had heard to teachers.
Mr Wallen said he specifically instructed his officers investigating the murder not to ask the children why they did not report what Cornick had said.
He told the jury: "It would be wholly wrong to sit here and raise that perhaps all this could have been avoided if a 15-year-old boy had told the teacher. I think that would be wholly wrong."
Mr Armstrong told the court: "There is no question of the family apportioning blame." Mr Armstrong said he was asking these questions in order that the right lessons are learned.
Mr Wallen said: "Today, there will be children who are expressing appalling things on Facebook, they will be listening to music with explicit, violent lyrics, they will be playing violent video games, they will talk to one another in pretty derogatory and unpleasant terms but they won't kill their teacher at school and they won't kill anyone else."
He said that "with hindsight" the police, the school and Cornick's parents would have stopped him.
He said: "We cannot, from what happened, have foreseen this enormous crescendo of rage and violence that took place on that day."
The detective said Cornick has never shown any remorse to police for what he did.