The Amazon decision could prove awkward for European Commission president Jean-Claude Juncker, who was Luxembourg's prime minister and finance minister at the time of the alleged deal.
Amazon said it would appeal. "We believe that Amazon did not receive any special treatment from Luxembourg and that we paid tax in full accordance with both Luxembourg and international tax law," the company said.
"We will study the commission's ruling and consider our legal options, including an appeal. Our 50,000 employees across Europe remain heads-down focused on serving our customers and the hundreds of thousands of small businesses who work with us."
Vestager said: "Luxembourg gave illegal tax benefits to Amazon. As a result, almost three quarters of Amazon's profits were not taxed. In other words, Amazon was allowed to pay four times less tax than other local companies subject to the same national tax rules.
"This is illegal under EU State aid rules. Member states cannot give selective tax benefits to multinational groups that are not available to others."
The commission has been accused of protectionism for targeting major US companies in competition investigations in recent years. Its recent decisions include fining Google NZ$3.9b in June for abusing its search monopoly and a €110m (NZ$180m) fine for Facebook over its 2013 acquisition of WhatsApp.
Vestager denied that she was deliberately targeting US companies.
"This is about competition in Europe, no matter your flag, no matter your ownership, and its for all businesses to see that paying taxes is part of doing business in Europe," she said.