Flying is the fastest option (1h10), but you'll have to take into account:

* traveling times to the airports: London City Airport is close to the city center ([22 min to Bank Station][1]), but Edinburgh Airport is not ([35 min by the tram][2], or [25 min in light traffic][3] if you're driving or taking a cab outside peak hours);
* time spent getting through security;
* time waiting in the boarding room or for check-in ([15 to 30 min at least][4], depending on whether you have luggage or not).

So this will probably bring you closer to 3 hours total, city center to city center.

By train, the fastest is with the East Coast Line: 4h27. But there is also a sleeper service from London to Edinburgh (the [Caledonian Sleeper][5] Lowland Route):

> Travelling southbound, the Caledonian Sleeper departs from both
> Edinburgh Waverley and Glasgow Central at 23.40.  On a Sunday the
> service leave a little earlier at 23.15. The Glasgow Central train
> stops at Motherwell with both trains then joining at Carstairs. The
> train crosses the border stopping at Carlisle and then at Watford
> Junction before arriving at London Euston by 07.10, plenty of time for
> breakfast before having a whole day in London. Travelling northbound
> the Caledonian Sleeper Lowland route sets off at 23.50 five nights a
> week and at 23.27 on Sundays. The train splits into two portions at
> Carstairs with arrivals to Glasgow Central at 07.20 and Edinburgh
> Waverley at 07.20.

Driving is not a fast option (over 7 hours).


  [1]: http://www.londoncityairport.com/
  [2]: http://www.edinburghairport.com/transport-links/trams
  [3]: http://www.edinburghairport.com/transport-links/travel-into-edinburgh
  [4]: http://www.londoncityairport.com/travelandbooking/page/check-in
  [5]: https://www.sleeper.scot/route-destinations/caledonian-sleeper-route