The text talks of a "contiguous" as well as viable Palestinian state, something which would require the inclusion of part of Jerusalem, and also states that the EU "has never recognised the annexation of East Jerusalem".
Israel captured the area in the 1967 Six Day War, immediately annexed it and claims all of the city as its eternal capital.
The agreed EU statement said that "the European Union will not recognise any changes to the pre-1967 borders".
The issue had been subject to intense discussion among the European ministers, with some nations wanting to keep the mention of East Jerusalem in the text and others reluctant to be seen as prejudging the result of any eventual Middle East peace deal.
Jean Asselborn, Luxembourg's foreign minister, was one of the ministers most supportive of the original Swedish proposal.
East Jerusalem is "not part of Israel," he said.
"It [the EU position] was a step on the way to having the international community assume its direct responsibility towards ending the Israeli occupation of all the Palestinian territory occupied since 1967."
Salam Fayed, the prime minister of the Palestinian Authority
Others EU nations, notably Germany, Italy and the Czech Republic, said they were reluctant to be seen to be imposing a settlement on Israel and the Palestinians.
"To decide here in Brussels what the future status of Jerusalem should be would be very frustrating for the negotiators," said Franco Frattini, Italy's foreign minister.
Nour Odeh, Al Jazeera's correspondent in Ramallah, said that Salam Fayed, the prime minister of the Palestinian Authority, had provisionally welcomed the EU statement.
Acknowledging the EU position, Fayed said it was a "step on the way to having the international community assume its direct responsibility towards ending the Israeli occupation of all the Palestinian territory occupied since 1967".
But the Palestinian PM also said any political settlement must enable "the Palestinian people to exercise self-determination, as well as the establishment of an independent and sovereign state, with East Jerusalem as its capital".
Tim Friend, Al Jazeera's correspondent in Brussels, said "many observers are saying that Europe filling a vacuum left by the US ,while it's pre-occupied with other international issues, might [allow Europe to] become much more of a key player in the Middle East peace process."
Nir Barkat, Jerusalem's mayor, has written an open letter to Catherine Ashton, the new EU foreign policy chief, warning of the possible consequences of splitting up the city.
Barkat said: "Throughout the history of the world, there is not one important city that was divided that functioned successfully.
"They either reunited or ceased to function properly. The lesson is too clear. Jerusalem must stay united.".
Scores of Palestinians protested in front of the French and Swedish consulates in Jerusalem to support the EU presidency's initiative on East Jerusalem.
A confidential report by EU heads of mission in Jerusalem last week accused Israel of actively pursuing the annexation of the east of the city and undermining hopes for peace with Palestinians.