"The Duke of Sussex accepted an apology and "substantial restitution" from the Mail on Sunday and Mail Internet publishers for charges that he "turned his back" on the Royal Marines.
Two articles alleged Prince Harry had not been in touch with the Marines after stepping down as a senior royal.
In a statement to the High Court, a lawyer for Harry called the allegation "baseless, false and defamatory".
He will donate the damages to the Invictus Games Foundation, she said.
Harry sued Associated Newspapers for libel over two "almost identical" articles published in the newspaper and online last October.
They claimed he had "not been in touch by phone, letter nor email since his last appearance as an honorary Marine" in March.
The prince's lawyer told the court that Harry had in fact made "repeated and concerted efforts" to support the Royal Marines and other parts of the armed services - even though he had been forced to step back from his ceremonial roles.
'Personal attack'
In a short statement at the remote hearing on Monday, the duke's lawyer Jenny Afia said Associated Newspapers had accepted the allegations were false, "albeit after considerable damage was already done".
She said Harry was "proud to have served in the British armed forces for 10 years in Her Majesty's name" and "has maintained active links with those forces ever since and will continue to do so in the future".
"The duke's commitment to the men and women who have put their lives on the line, to those who have made the ultimate sacrifice for their country, and to military families, is steadfast and unquestionable," said Ms Afia.
"For this reason, the baseless, false and defamatory stories published in the Mail on Sunday and on the website Mail Online constituted not only a personal attack upon the Duke's character but also wrongly brought into question his service to this country."
Ms Afia added that Harry was donating his damages to the Invictus Games Foundation "so he could feel something good had come out of the situation".
A previous version of the duke's statement, due to be read in court following the settlement, was criticised by a judge for being "unduly tendentious".
In a costs order, Mr Justice Nicklin said the process of giving a statement in open court was not a "platform for collateral attacks" and should not be "misused".
He said the duke's original statement included criticisms of Associated Newspapers, which had, by agreement, been removed or amended.
Mail apology
On 27 December, the Mail On Sunday printed an apology, accepting the duke had been in touch with the Royal Marines, and said it had made a donation to the Invictus Games Foundation, which runs the competition for wounded, injured or sick servicemen and women set up by Harry in 2014.
But Ms Afia criticised the apology, saying it "used wording which significantly underplayed the seriousness of the accusations made against him". She also said the Mail on Sunday offered to directly donate the duke's damages, but Harry wanted to do it himself.