The Prince's press secretary, Sandy Henney, said yesterday that the departure was being confirmed after a newspaper report "to avoid any further unhelpful and inaccurate speculation on the matter".
"We decided to confirm this mutual decision by the Prince of Wales and Commander Aylard, who has been with the Prince for 11 years," a statement said.
It was issued after the Sun told the Press Association it would reveal Cdr Aylard's departure today.
The newspaper said: "The Prince told Cdr Aylard, his right-hand man and best friend, during an emotional meeting at Lockmore, near Inverness, this morning."
It added that Cdr Aylard shouldered much of the blame for the controversial interview with David Dimbleby in which the Prince admitted adultery.
Stuart Higgins, the paper's editor, said: "The parting of the ways is not altogether a surprise. There has been growing friction between the two men. There were disagreements over the future strategy and the profile of Camilla Parker Bowles."
The Prince's office denied that Cdr Aylard had been sacked.
"He took over as private secretary in 1991," Ms Henney said. "His initial contract as private secretary was for five years.
"He has said privately that he would leave at some stage when the time was right. There is no other reason for the departure. Both the Prince and Richard feel the time is right for a change. We hope to announce a successor soon."
Cdr Aylard has been seen as a mainstay of support for the Prince during his separation and divorce.
The former Royal Navy officer joined Buckingham Palace as equerry to the Princess of Wales 11 years ago, moving later to become an assistant private secretary to the Prince before promotion to become his closest aide.
He is thought to have been taking stock of his future in recent months.
In May it emerged that he was to divorce. He and his 46-year-old wife Suzanne, known as Zan, had agreed to part, it was confirmed.
They have two children, Sophie, 10, and Katie, four. The marital home has been in Godalming, Surrey. It was said at the time that no one else was involved in the marriage break-up.
Friends of Cdr Aylard said that he was married to his work and spent more time in the office than at home.
Most weekday nights were said to be spent away from his family at an apartment in Wren House at Kensington Palace.
Unlike many royal aides, he went to grammar school and a red-brick university rather than public school and Oxbridge.
His advice to the Prince to cooperate with the Dimbleby biography and television documentary, which led to the admission of adultery on prime- time television, was said to have put him at odds with "old guard" courtiers.
Since then the long-term relationship between the heir to the throne and Camilla Parker Bowles has attracted increasing attention.Reuse content