The rescue helicopter almost collided with the Army Air Corps Apache, which had just taken off. The Air Corps chopper was doing 115mph when it almost collided with the air ambulance.
It stopped ascending and the air ambulance passed just 300ft above it at 140mph.
The incident took place over the airfield in Wattisham, Suffolk.
The East Anglian Air Ambulance was travelling from its base at Cambridge airport to a callout in Ipswich.
The Duke of Cambridge flew the same EC145 helicopter between 2015 and 2017.
Prince Harry was an Apache pilot at Wattisham for three years.
Prince William has previously spoken about his time as a pilot for the East Anglian Air Ambulance.
He revealed that the job involved “very traumatic” callouts involving children which took him “over the edge”.
The Duke added that having his own children – George, Charlotte and Louis – made him more aware of distressing situations.
READ MORE: Queen forced to flee ‘in nightie’ after Buckingham Palace intruder
He also commented on the importance of having support systems in place for employees.
Prince William said: “You don’t want to share with your loved ones because you just don’t want to bring that sort of stuff home.
“So the only place you can talk about it is at work and if you don’t necessarily have the right tools or the right environment at work, you can see why things can snowball and get quite bad.”
He said: “There’s still a stigma about mental health.
“We are chipping away at it but that wall needs to be smashed down.”
He added: ”We could really use some more voices in the workplace.”
He also urged workplaces to create an “understanding” and “supportive” setting for their employees.
“Standing up and saying, ‘Yeah, I’ve been there. I’ve done that and I could have done more’
“I think setting a culture of this open, understanding, supportive environment in the workplace where HR is a door that people feel they can go to, I think that’s really important.”
The Duke stepped down from his role in the air ambulance service in 2017 to become a full-time royal.