During a row, William O'Brien, 58, told his employer that "he could stuff the job", James Hunt QC, for the prosecution, said.
But after Mr Scott, 34 - one of Britain's most successful trainers - asked Mr O'Brien for written confirmation of his resignation, there was a confrontation at the stud farm near Newmarket, Cambridgeshire.
It is alleged that the groom shot Mr Scott in the chest with a single- barrel shotgun at a range of 3 to 5ft, saying: "This is for you, you bastard."
Mr O'Brien denies murdering Mr Scott and threatening to kill a gardener, Christopher Forster, at the stud farm on 30 September last year.
Mr Hunt told the jury that Mr O'Brien was "an obsessive worker who developed . . . a deep resentment and dislike of his employer, Mr Scott, with whose methods he disagreed".
Mr O'Brien was employed as stud groom at the Glebe Stud - about three miles from the Oak Farm Stables in Newmarket, where Mr Scott had his main training business - for about 10 years. Mr Scott bought the stud farm in December 1992.
Mr Hunt said the row came to a head three days before the killing. The defendant apparently told a bloodstock agent that it was not convenient for prospective purchasers to view a horse. Mr Scott took exception and raised it with him.
"The defendant was abusive. He told Mr Scott to stuff his job. In effect, he was resigning."
Mr Hunt went on: "As a result of that outburst and things that were said to him, Mr Scott sent the defendant a letter asking O'Brien to confirm his intention to resign by signing the letter and returning it."
After receiving the letter, Mr O'Brien told Mr Forster: "The old man will be down to see me tonight . . . I am going to have it out in the barn and shut the door and have it out with him, and no one will hear what is going on."
Mr Hunt said Mr Scott took the precaution of taking Mr Forster with him when he went to the barn that Friday evening.
He told the court that after a conversation in which Mr Scott told Mr O'Brien he was suspended, the three of them began to take Mr O'Brien's property out of the barn. Eventually Mr O'Brien said everything was out and he wanted Mr Scott "to have a look and make sure everything's all right".
Mr Hunt said that moments later Mr Forster saw Mr O'Brien standing over Mr Scott, aiming the shotgun at his chest area. He allegedly fired, saying: "This is for you, you bastard."
Mr Hunt said that Mr O'Brien then threatened Mr Forster, but was interrupted by the groom's wife, Helen.
Mr Scott's widow, Julia, 38, and his mother, Lady Anne Scott, watched as Mr Hunt showed the jury the shotgun allegedly used by Mr O'Brien.
The hearing was adjourned until today when the jury, judge and counsel are to visit the scene of the killing.Reuse content