UK Airprox Board investigators said the Eurocopter 145, used by the East Anglian Air Ambulance, missed the remote-controlled machine "by chance".
The incident happened 1,900ft (579m) above London in August.
There had been "high risk" of a crash, "endangering the EC145 and its crew" over a busy area, the report said.
Prince William was not in the aircraft at the time but the East Anglian Air Ambulance (EAAA) said it had been flown repeatedly by the royal during his work for the service.
The UK Airprox Board, which probes such incidents to improve air safety, said the drone had passed within 98ft (30m) of the air ambulance, which was carrying medics.
The drone was flying above its permitted altitude and the near-miss was the highest category of risk, the report stated.
It said: "This was a situation where a collision had only been narrowly avoided and chance had played a major part."
The near-miss happened at 19:45 BST on 26 August.
The ambulance control room was contacted by the pilot telling them to inform the police, the report said.
The drone pilot was never found.
An EAAA spokeswoman added: "There are strict rules that drone operators must follow and it is important they are aware of their responsibilities for safe operations at all times."
In January, Prince William said he would be leaving his role as a pilot for the air ambulance charity to spend more time in London, where his children will be schooled.