A policeman on duty at the palace challenged Paul Burrell, 44, when he was seen leaving with two of the princess's dresses and a mahogany box, jurors were told.
The court also heard that Mr Burrell denied having any items from the palace at his home and gave a variety of explanations when a search uncovered them.
Mr Burrell denies stealing more than 300 items belonging to Diana, Prince Charles and Prince William.
Confronted
Prosecutor William Boyce QC said the policeman who spotted Mr Burrell at the palace, at 0330 on a morning after Diana died on August 31, 1997, confronted him when he returned with the box and dresses.
Mr Boyce said the officer asked Mr Burrell what he was doing and was told: "I'm removing some items the family have asked me to destroy."
The officer asked him "Is it usual to do it at this hour?", to which Burrell is alleged to have said: "It's so it's done discreetly".
Lady Sarah McCorquodale, Diana's sister and one of the executors of her will, later said no-one had been authorised to remove property, Mr Boyce added.
He said that Lady Sarah awarded Mr Burrell £50,000 after he declined the offer of some of Diana's possessions, "wholly unaware of the things he had already taken".
'Reluctant'
The court also heard that Mr Burrell initially denied having any items at his home in Farndon, Cheshire, when he was questioned by police.
Once the items had been found Mr Burrell offered a wide range of explanations about why they were in his possession, Mr Boyce said.
Asked about photographic negatives of Diana's wedding dress, he said he had not got round to returning them to Windsor.
He added: "I was very reluctant because my memories of her death were still much too raw."
It is claimed that Mr Burrell said he kept a back door key to Kensington Palace for "sentimental" reasons and that he packed a silver salver "by mistake".
Other items included three framed photographs of Prince William on a sofa with supermodels Naomi Campbell, Christy Turlington and Claudia Schiffer at an event he attended.
Miss Schiffer had expected signed copies would be sent to them afterwards but the court heard they did not arrive.
Mr Burrell's explanation was that "she told me not to send them. It was inappropriate. Although I was asked to destroy them, I kept thinking the Princess might change her mind or that Prince William might later ask for them."
Witnesses
Prosecuting counsel William Boyce QC asked the jury to bear in mind the Princess died in 1997 and the items were found in 2001.
The prosecution alleges Mr Burrell plundered Diana's intimate possessions after her death and stowed them in the loft, study and wardrobe at his home.
The trial is expected to last up to six weeks.
Although there are dozens of witnesses to be heard, including Diana's sister and her mother Frances Shand Kydd, it is not expected that the Prince of Wales or Prince William will take the stand.
The case continues.