Margaret Chisholm told the High Court in Glasgow that her brother Ronnie Coulter made the admission to her after a jury cleared him of the murder.
She also said that when he was on remand awaiting trial, Mr Coulter neither admitted or denied the murder.
Mr Coulter denies murdering Mr Chhokar and has blamed two other men.
The 48-year-old, from Wishaw, denies stabbing the 32-year-old in Garrion Street, Overtown, North Lanarkshire, on 4 November 1998.
Mr Coulter has lodged a special defence blaming his nephew Andrew Coulter - Mrs Chisholm's son - and another man, David Montgomery.
Mrs Chisholm was giving evidence as the trial entered its fourth week.
She told prosecutor Alex Prentice QC that hours after her brother was cleared of murdering Mr Chhokar in 1999, he visited her home in Overtown.
Mr Prentice asked her: "Why was he there?" and Mrs Chisholm replied: "Because he'd just been found not guilty. He was sitting on the floor in the living room leaning against a radiator."
The prosecutor then asked: "What did he say?" and she replied: " He said 'I've just got away with the perfect murder.'"
Mrs Chisholm also told the court that her brother said: "He took one off me, so I took one off him."
She said she believed this was a reference to God and the fact that Mr Coulter had a baby girl that was stillborn.
Mr Prentice also asked her about a visit she made to her brother in Barlinnie Prison in 1998 or 1999, while he was on remand awaiting trial.
The prosecutor asked if she had asked him anything and Mrs Chisholm replied: "If he done it. If it was him that done Chhokar."
Mr Prentice said: "Did he answer?" and She replied: "He said 'Mmhmm.' He never said aye or nah."
The witness said that was all she could remember about their conversation in the prison.
Mr Prentice also showed Mrs Chisholm a transcript from another murder trial in 2000, where her son Andrew and Mr Montgomery were the accused. Both were later cleared of murder.
In the transcript Mrs Chisholm had said her brother told her he had stabbed Mr Chhokar.
The prosecutor then asked: "Did you tell the truth on oath when you gave evidence in that trial?" and she answered: "Yes."
Mrs Chisholm told the jurors that Mr Coulter phoned her from prison while he was on remand and asked her to search for a tammy (hat), with a knife wrapped inside it, on the old railway line between Overtown and Gowkthrapple.
She said: "I went with my daughter Rona and my son Andrew, but with no intentions of finding them. It was freezing. We took the dog for a walk."
Mrs Chisholm claimed that in an earlier phone call her brother asked her to go to Wishaw market, along with his former girlfriend Alexandra Tierney, and purchase a box of knives.
She was asked what she was to do with the box of knives and replied: "Take the smallest one out and put it in Ronnie's cutlery drawer."
The court was told she never did this, but kept the box of knives.
Under cross-examination by defence QC Donald Findlay, Mrs Chisholm denied that she was making up lies about her brother to help her son, Andrew.
Mr Findlay said: "You would be anxious to do all you could to protect your boy," and Mrs Chisholm replied: "No , if he had killed him I'd be standing in this box saying my son did it."
Referring to her evidence the QC added: "This is just a concoction of lies to get Andrew off at Ronnie's expense." Mrs Chisholm replied: "No."
Mr Findlay asked why she had not phoned the police when Mr Coulter allegedly mentioned the knife in the tammy.
He went on: "Why did you not tell the police anonymously about this," and Mrs Chisholm responded: "It would have been like looking for a needle in a haystack."
The QC then said: "One explanation might be that you were terrified in case it was Andrew's DNA or fingerprints on it," and she replied: "No."
Mr Findlay added: "Your evidence has been a pack of lies from beginning to end." Mrs Chisholm said: "I'm not a liar. I'm not lying in court."
The jury has previously heard that Mr Coulter, his nephew Andrew and Mr Montgomery went to Mr Chhokar's home at Garrion Street, Overtown, around 23:30 on the night he died to speak to him about a Giro cheque which had allegedly been stolen from him.
Andrew Coulter and Mr Montgomery have given evidence in which they denied having anything to do with the killing of Mr Chhokar.
Ronnie Coulter denies all the charges against him.
The trial before judge Lord Matthews continues.
The sister of a man accused of stabbing Surjit Singh Chhokar in 1998 has told a trial he claimed that he had "got away with the perfect murder".