A drone flying more than 20 times the allowed height came within 15m (50ft) of a Boeing 737 approaching a runway at Stansted Airport in Essex.
The plane was flying at 10,000ft (3km) and coming in to land on 17 August when the captain spotted the drone.
The first officer then saw "a dark-coloured square or rectangle-shaped object pass down the right side of the aircraft with minimal separation".
The UK Airprox Board rated the risk of collision as the highest possible.
After the incident, which happened at 16:36 BST, the plane was inspected on the ground and found no evidence of contact or damage.
It is not known whether the Boeing 737 was carrying passengers or cargo.
The drone operator, who it is understood has not been traced, was in breach of the Air Navigation Order 2009, which refers to flight safety of unmanned craft.
Drones must not be flown in airspace above 400ft (121m) or in the vicinity of airports without permission from air traffic control and the Civil Aviation Authority (CAA).
The Airprox Board, which investigates near misses, said the drone was "endangering other aircraft at that location" and that "providence had played a major part in the incident".
A CAA spokesman said: "It is totally unacceptable to fly drones close to airports and anyone flouting the rules can face severe penalties including imprisonment.
"Anyone operating a drone must do so responsibly and observe all relevant rules and regulations. The rules for flying drones are designed to keep all airspace users safe."