Mrs Maguire, 61, was murdered by Will Cornick at Corpus Christi Catholic College in Leeds in April 2014.
The inquest heard how Cornick swapped messages on Facebook which fellow students about killing Maguire four months before the attack, that they did not take seriously. If I do it [kill her] on Tuesday will you bail me out?' He had changed his profile picture to an image of a Grim Reaper during the exchanges.
The inquest heard he held a grudge against Mrs Maguire and was prepared to got to jail "so as not to have to worry about life or money", the inquest heard.
Denise Courtney, Mrs Maguire's sister, is also attending the inquest.
She told the hearing via Skype that after police arrived at school on the day of the murder, another pupil came to tell her that he's seen Will Cornick with a knife that morning.
'She was sat in the front of the class engaged with another pupil at the time and had pupils around her.
A Pulp Fiction-obsessed schoolboy asked a fellow classmate to film the murder of his Spanish teacher who he had boasted he would kill "for £10" before he stabbed her to death, an inquest heard.
The officer took the jury through the "shocking" events at the school describing how the "petite" teacher was "ambushed" by a "strapping 15-year-old lad".
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.
Det Sup Wallen ended his evidence by saying: 'There is only one person responsible for her death and that was William Cornick.
He told the court that "lessons must be learnt" from his wife's "catastrophic death" but blasted the authorities for failing to seek proper answers to what had driven Cornick to murder.
In another rant, he wrote: "The one absolute ******* bitch that deserves more than death, more than pain, torture and more than anything that we can understand".
The inquest, which is expected to last for two weeks, continues.