The incident happened at around 1.10pm on Friday and involved a Loganair plane flying to the Capital from Sumburgh Airport in Shetland.
The plane was at a height of around 4000ft when the drone, believed to have been piloted from the Bathgate or Armadale area, flew within 20 to 30 metres of the airliner.
No-one was injured and the plane landed successfully.
Police have now issued a warning and are appealing for anyone with information to come forward.
Chief Inspector Barry Blair, local area commander for West Lothian, said: “The pilot was forced to take evasive action to avoid a collision whilst preparing to land the plane.
“Had these aircraft collided the consequences could have been far more serious.
“We are working alongside the aviation authorities to identify the pilot of the drone and determine the full circumstances surrounding this incident.
“Drone users are reminded only to operate their crafts within the guidelines set out by the Civil Aviation Authority and should consult the legislation should they have any queries about appropriate drone use.”
Police Scotland said drone pilots should be aware of the appropriate legislation and the safety issues to be considered when operating such aircraft.
They said anyone operating a drone needed to ensure they did so within the law and the guidelines set out by the Civil Aviation Authority and National Air Traffic Services’ “Drone Safe” campaign.
It comes just months after a plane coming into land at Edinburgh Airport came within 75ft of a drone on November 25 last year at a height of around 3700ft.
Another near miss was reported just three days earlier near Kilmarnock involving an aircraft heading to Glasgow Airport.
Meanwhile in March last year a drone came 100ft from hitting a Ryanair aircraft landing at Glasgow Airport, in the first such case in Scotland.
Jonathan Hinkles, Loganair managing director, said: “Flying drones into the path of aircraft is incredibly dangerous.
“New laws are being proposed to deal with this growing threat and our view is that they can’t come soon enough to deal with irresponsible idiots like this.
“Aircraft are designed to withstand bird strikes, but the hard material of a drone is a different matter.”
A spokesman for Edinburgh Airport said: “People should be in no doubt of the seriousness of this issue.
“We would ask that all users understand the legislation and guidelines surrounding drone usage and behave responsibly.”