Passengers on lines between the capital, North Berwick and Dunbar were affected.
The driver started his shift at 5:40am rather than 8:40am as scheduled - so finished three hours earlier than he was supposed to.
ScotRail blamed an administrative mix-up and said the driver could not continue working beyond his maximum hours.
It told passengers: "Due to a shortage of train crew between Edinburgh and Musselburgh, disruption is expected until 1700.
Trains cancelled were the 14:15 Edinburgh to Dunbar, 14:43 Edinburgh to North Berwick, 15:43 Edinburgh to North Berwick, 15:12 Dunbar to Edinburgh, 15:27 North Berwick to Edinburgh and 16:26 North Berwick to Edinburgh."
ScotRail said this was due a mix up where driver started his shift earlier than supposed to, following a change in roster.
But due to the late notice of what happened, a replacement driver could not be found.
The train operator said that although only one driver involved, some of the cancellations were a knock-on effect of other drivers being moved around to prevent peak services also being stopped.
Kevin Lindsay, Scotland district secretary of the main drivers' union Aslef, said: "Unfortunately this is not uncommon, but due to driver shortages, trains get cancelled.
"Around ten additional drivers will be passed out in December in Edinburgh and that should help.
"But until then, trains will get cancelled unless drivers work overtime."
A ScotRail spokesperson said: “We’re sorry to customers who have been disrupted following a shortage of train crew.
“Anyone delayed by 30 minutes or more can claim money back through the Delay Repay guarantee on our website or mobile app.”