Buckingham Palace said Philip -- formally known as the Duke of Edinburgh -- took the decision on his own after rolling over his Land Rover last month.
"After careful consideration the Duke of Edinburgh has taken the decision to voluntarily surrender his driving license," Buckingham Palace said in a brief statement.
Police in the eastern part of England where the accident happened outside a royal residence said they had passed Philip's file to prosecutors to determine whether anyone should be charged.
"Norfolk Police can confirm that the 97-year-old driver of the Land Rover involved in the collision at Sandringham ... voluntarily surrendered his license to officers," said a police statement.
"The investigation file for the collision has been passed to the Crown Prosecution Service (CPS) for their consideration."
A CPS spokesman said the service "will take this development into account" as it studies Philip's case.
Few royal watchers seriously expect the duke to be punished by the police.
- 'Strong-willed' -
A witness told British media that Philip had emerged unharmed but "shocked and shaken" from the collision with the much smaller Kia hatchback.
Police said a nine-month-old baby in the back seat of Kia was uninjured. One woman in the vehicle broke her wrist and the other cut her knee.
The duke was forced to follow standard police procedure and take a breath test.
Police said the results "provided negative readings" for both drivers.
Philip came under days of media criticism for failing to quickly and publicly apologize for causing the crash.
The same witness said Philip had told police he was "blinded by the sun" when he turned onto the road without seeing the oncoming car.
Two days after that accident, the duke was photographed driving a replacement Range Rover without a seatbelt, which is illegal in Britain.
James Brookes, of the Royal Central news site, said Philip was a "strong-willed" individual who was probably not swayed by the public backlash when deciding to hang up his key.
"He wants to enjoy his retirement but he was very shaken by the crash," Brookes told the BBC.
But Brookes conceded that Philip would have "obviously" been aware of the bad press.
Philip's behavior also raised questions about why he was still driving instead of being chauffeured around by his entourage.
"There will be some surprise that the duke still drives himself on public roads," BBC royal correspondent Jonny Dymond wrote last month.
Dymond also called Philip a "fiercely independent" person who "would have resisted any suggestion that he be denied the right to drive himself."
Philip retired from public life in 2017 and underwent a hip replacement operation last April.
He is famous in Britain for his forthright manner and his love of speed.
The royal family website says the duke learned to fly all types of aircraft after passing a Royal Air Force test in 1953.