European Council President Donald Tusk announced the 27 member states had formally agreed on a strategy at a special meeting in Brussels.
The leaders took less than an hour to decide on their joint approach.
President Tusk tweeted the outcome of their discussions, saying: "Guidelines adopted unanimously.
"EU 27 firm and fair political mandate for the Brexit talks is ready."
The guidelines remained essentially unchanged from the draft proposals published by Mr Tusk last month.
A key element is the "phased" approach – with leaders insisting a future trade deal will only be considered later on in Brexit negotiations.
At the start of the summit, Mr Tusk said it was vital for the 27 to remain united.
"It is only then that we will be able to conclude the negotiations - which means our unity is also in the UK's interest," he said.
"As for now I feel strong support from all the EU institutions, including the European Parliament, as well as all the 27 member states.
"I know this is something unique, but I am confident that it will not change."
Earlier in the week, German chancellor Angela Merkel said it appeared the UK was under the "illusion" that it could retain EU benefits once it departed the bloc.
Asked if he agreed with Mrs Merkel's analysis, EU Commission president Jean-Claude Juncker told reporters in Brussels: "That's my impression, yes."
Mr Tusk has insisted "sufficient progress" must be made on disentangling the UK from its ties and obligations to the EU before discussions can turn to the post-Brexit relations.
Key issues in the first phase are the size of the disputed "divorce bill" the UK will need to stump up on departure - estimated by EU officials at around £50 billion - and addressing uncertainty over the rights of EU citizens living in the UK and British expats residing on the continent.
Mr Tusk has also signalled a desire to resolve the thorny problem of the Irish border - and how to avoid customs and immigrant checkpoints on the politically sensitive frontier - before moving negotiations to the second stage.
Arriving at the landmark Europa building for the summit, Mr Tusk had said: "We all want a close and strong future relationship with the UK - there is absolutely no question about that.
"But before discussing our future we have to sort out our past, and we will handle it with genuine care, but fairly.
"This I think is the only possible way to move forward. We also need solid guarantees for all citizens and their families who will be affected by Brexit on both sides.
"This must be the number one priority for the EU and the UK.
"And the Commission has already prepared a precise and detailed list of citizens' rights we want to protect."