The 6.7-magnitude quake hit 7 miles north-east of Kos, near the Turkish coast, with a depth of 6 miles, the US Geological Survey said.
At least 100 others were also injured at the popular tourist destination. Some buildings were damaged.
In the Turkish city of Bodrum, dozens of people were injured as they tried to flee the quake.
The earthquake struck at 01:31 local time on July 21.
The two deceased have not been named but police said that both victims were tourists – a 22-year-old from Sweden and a 39-year-old from Turkey.
They died after they were crushed by debris from either a collapsed wall or an old building, police said.
Dozens more were injured when buildings collapsed, some of them suffering broken bones with a number in serious condition, Kos regional government official Giorgos Halkidios said.
The Greek army is supporting the emergency services with the rescue operation, he added.
Kos was nearest to the epicenter of the quake and appeared to be the worst hit, with damage caused to a number of older buildings, including cracked walls and smashed windows.
The mayor said the buildings that suffered the most damage were built before “earthquake building codes” were introduced.
“The rest of the island has no problem. It’s only the main town that has a problem,” Mayor Giorgos Kyritsis said.
The roof of a bar on the island also collapsed, and a ferry was unable to dock due to damage at the harbor, Greek police said.
Tourists later gathered outside terminal buildings at Kos airport having left their hotels and apartments.
In Turkey, pictures shared on social media showed people in the city of Bodrum walking with water lapping their ankles and localized flooding, and about 80 people sought hospital treatment for minor injuries.
Others described waking in the night after being violently shaken in their beds.
Residents fled their homes and tourists ran from holiday apartments with pillows and blankets. Some sustained injuries after jumping from windows in panic, Turkish broadcaster NTV said.
At a hospital in Bodrum, the wounded were being treated in the garden as a precaution after the quake caused slight damage to parts of the hospital ceiling, the Hurriyet Daily News reports.
The earthquake also triggered high waves off Gumbet, a resort town near Bodrum, which flooded roads and left parked cars stranded, Turkish media report. There were no reports of casualties.
Turkey and Greece sit on significant fault lines and are regularly hit by earthquakes.
One of the deadliest in recent years hit the heavily populated northwest of Turkey, in 1999, killing some 17,000 people.
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…
Misleading allegations, rumours and outright lies about voting and fraud are flooding online spaces in…
At least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…