The vote, which followed the first debate on the EU Referendum Bill, means the legislation moves to the next stage of its progress through the UK parliament.
Foreign Secretary Philip Hammond said a "generation" had been denied a say on the UK's place in Europe, and the public must now have the "final say."
MPs voted by 544 to 53 in favor of the bill.
The Conservatives and Labor support the bill, but the Scottish National Party opposes it.
Earlier, MPs voted to reject an SNP amendment opposing the bill.
The bill, which has now passed its second reading and will next be examined by a committee of MPs, has several more stages to pass through.
Prime Minister David Cameron, who first promised a referendum in 2013, has pledged to negotiate a "better deal" for the UK in Europe in advance of the vote - to be held by the end of 2017 at the latest.