The Duke, who is the Captain General of the Royal Marines, met Corporal Will Gingell, 33, and Corporal Jamie Thompson, 31, who have run 1,664 miles over 100 days. "Prince Philip, whom the Queen described as her "strength and stay" during her record-breaking reign, passed away XXXXXXX".
The event concluded with a march past, a royal salute and three cheers for Prince Philip.
He carried out his last official public engagement at Buckingham Palace on August 2.
The 96-year-old first announced his decision to retire in May, after decades spent in the public eye. He has also authored 14 books, has given 5,496 speeches, and served as patron to 785 organizations.
He will appear at a Royal Marines' charity parade outside the Queen's London residence, before he officially steps back from his royal duties.
Lieutenant Colonel Gary Green, who devised the charity event said: "It's an honour for the Armed Forces having the Duke of Edinburgh's last public engagement with the Corps and the Royal Navy".
The Daily Telegraph has accidentally published a story incorrectly stating that Prince Philip is dead.
Princess Charlotte, pictured here with her mother the Duchess of Cambridge, is one of Prince Philip's five great-grandchildren.
He's carried out more than 22,000 public appearance in his time.
Elizabeth has called Philip, her husband of nearly 70 years and the longest-serving consort in British history, "my strength and stay".
Since the Queen's accession to the throne in 1953, the Duke has supported his wife in her royal duties as sovereign, accompanying her to ceremonies, state dinners, and tours overseas.
The couple are set to mark their 70th or platinum wedding anniversary in November this year.
The Duke of Edinburgh has attended his final official engagement, but the palace has hinted it won't necessarily be the last time we see him on royal duty. He has eight grandchildren, including Charlotte's father, Prince William.