Four men from Brazil, Malawi, the Netherlands and Nigeria, and one Indonesian woman, were shot dead in pairs just after midnight on Saturday on the Nusakambangan island penal colony.
The other foreign national, a woman from Vietnam, was executed in Boyolali, according to Attorney General Office's spokesman Tony Spontana.President Joko Widodo rejected the condemned convicts' requests for clemency last month.
He also refused a last-minute appeal by Brazilian President Dilma Rousseff and the Dutch government to spare their countrymen - Brazilian Marco Archer Cardoso Moreira, 53, and Ang Kiem Soe, 52, who was born in Papua but whose nationality is Dutch.
Dutch Foreign Minister Bert Koenders said late on Saturday he had temporarily recalled the country's ambassador to Indonesia and summoned Indonesia's representative in The Hague to protest Ang's execution.
He said the 'cruel and inhumane punishment' was carried out despite King Willem-Alexander and Prime Minister Mark Rutte personally contacting Mr Widodo.
'My heart goes out to their [the victims'] families, for whom this marks a dramatic end to years of uncertainty,' Koenders said. 'The Netherlands remains opposed to the death penalty.'
A spokesman for President Roussef said she was 'distressed and outraged' after Indonesia ignored her last-ditch pleas.
'Using the death penalty, which is increasingly rejected by the international community, seriously affects relations between our countries,' the spokesman said.
The Brazilian ambassador to Jakarta was being recalled for consultations, the spokesman added.
Amnesty International said the executions, the first under the new president who took office in November, were 'a retrograde step' for human rights.
But Indonesia's attorney general, Muhammad Prasetyo, has said there is no excuse for drug dealers and 'hopefully, this will have a deterrent effect.'
Mr Prasetyo said the new government had a firm commitment to fight against drugs. President Widodo, who has personally taken a particularly hard line towards drug use, has said he would not grant clemency to 64 drug convicts on death row.
'What we do is merely aimed at protecting our nation from the danger of drugs,' Prasetyo said on Thursday.
He said figures from the National Anti-Narcotic Agency showed 40 to 50 people die each day from drugs in Indonesia.
He said that drug trafficking rings have spread to many places, including remote villages where most victims are youngsters of productive age. Indonesia has become the largest drug market in Southeast Asia with 45 per cent of the region's drugs in circulation.
A second batch of executions would be held later this year and also target drug smugglers, he warned.
Indonesia, a sprawling archipelago of 250million people, has extremely strict drug laws and often executes smugglers. More than 138 people are on death row, mostly for drug crimes. About a third of them are foreigners.
Rupert Abbott, Amnesty International's research director for Southeast Asia and the Pacific, called for Indonesia to rethink its position on the death penalty. Indonesia resumed executions in 2013 after a five-year gap.
'Indonesia's new government took office on the back of promises to improve respect for human rights, but carrying out these executions would be a regressive move,' he said.
'Rather than putting to death more people, the government should immediately impose a moratorium on the use of the death penalty with a view to its eventual abolition'
Amnesty noted that drug-related offences do not meet the threshold of the 'most serious crimes' for which the death penalty can be imposed under international law.
While no executions were carried out in Indonesia in 2014, the government has announced that 20 are scheduled for this year, the campaign group said.
Mr Abbott said: 'It would be a huge set back if the government goes ahead with its plans to execute as many as 20 people during the year. Tackling rising crime rates is a legitimate goal of President Widodo's administration, but the death penalty is not the answer and does not work as a deterrent to crime.
'The plans for a new spate of executions come at a time when the government is actively seeking to protect Indonesian nationals who face the death penalty overseas.
'If the death penalty is wrong elsewhere, it is surely wrong in Indonesia too.'
Brazilian Moreira was arrested in 2003, after police at Jakarta airport found 13.4 kilograms (29.5 pounds) of cocaine hidden in his hang glider. A second Brazilian national, Rodrigo Muxfeldt Gularte, remains on death row in Indonesia, also convicted of drug trafficking.
Ang was arrested near Jakarta in 2003, after police found equipment which they estimated had been producing 15,000 ecstasy pills a day for three years. Police confiscated 8,000 pills and thousands of dollars.
The others who were executed were Namaona Denis, 48, from Malawi; Daniel Enemuo, 38, from Nigeria; and 26-year-old Indonesian Rani Andriani.
Tran Bich Hanh, 37, of Vietnam, asked authorities to let her face the firing squad uncuffed as one of her last wishes, Mr Spontana said.