The East Anglian Air Ambulance
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 above London last August.
The report said there had been "high risk" of a crash, "endangering the EC145 and its crew" over a busy area.
Prince William at the controls of the East Anglian Air Ambulance
This was a situation where a collision had only been narrowly avoided and chance had played a major part
UK Airprox report
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 of the helicopter, 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.
Prince William shows the Queen and Duke of Edinburgh the East Anglian Air Ambulance Duke & Duchess of Cambridge pictures Mon, March 20, 2017
Get Quotes on Home Insurance
Pictures of the Duke and Duchess of Cambridge's love story from the Royal wedding in 2011, to Prince George's first birthday in 2014.
Getty Images 1 of 143
Prince William, Duke of Cambridge and Catherine, Duchess of Cambridge attend the RBS Six Nations match between France and Wales
The report said: "This was a situation where a collision had only been narrowly avoided and chance had played a major part."
The ambulance control room was contacted by the pilot telling them to inform the police but 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 go to school.