Judge Sean Murphy QC found Paul Anderson, 30, who is in jail, in contempt for failing to answer a question during his evidence at his brother's trial.
Lee Anderson, 31, from Foxbar, Paisley, was jailed for 15 years last Thursday after being found guilty of the culpable homicide of Mr Ali by stabbing him in the neck at Sunshine Grocers in Green Road, Paisley, on June 15, last year.
In evidence during the four-week trial at the High Court in Glasgow, Paul Anderson claimed that someone told him that a man called Damien O'Neill was responsible but he refused to give the name of the person who told him this, claiming that he would fear for his life if he did so.
Damien O'Neill was one of six men incriminated by Lee Anderson for the killing of Mr Ali.
But in his closing speech to the jury in the Lee Anderson trial, defence QC Brian McConnachie said that, after reviewing all the evidence, he did not consider Mr O'Neill one of the prime candidates for incrimination.
Sentencing Paul Anderson, Judge Murphy said: "You repeatedly refused to answer a question put to you during a murder trial. This is a blatant contempt of court. You said you were concerned for your own safety if you said who told you Damien O'Neill was responsible."
Defence counsel Louise Arrol told the court: "He was in fear for his safety in prison, but had ultimately provided information which was of assistance to the court."
During the trial of Lee Anderson the court heard that Paul Anderson gave police a statement in which he said his brother had said: "I stabbed the shopkeeper."
The statement also added that Lee Anderson told his brother he had got into an argument with Mr Ali after he was caught stealing in the shop.
But Paul Anderson denied that he had said this to police.
He was asked why he had signed a statement to this effect, if he had not said some of the things in it, and replied: "I'd been in the police station for 10 hours. I wanted out of there."
In evidence, he claimed he thought his brother Lee was joking and did not suspectd him. He told the court he went to Mill Street police office in Paisley on August 29 last year to tell officers that the murderer was a man called "Mull Mull".
Anderson told the jury that his brother Lee had only one knife in his house and it was for icing cakes.
He said that it was not sharp enough to have injured anyone.
During the trial, when Paul Anderson was asked if he had told police he had seen his brother sharpening the point of this knife weeks after the alleged murder, he replied: "No, I was just saying anything. I wanted out of the police station.