They showed symbolic unity by holding a joint press conference after the summit talks in the Slovak capital Bratislava.
It was the EU's first major meeting as 27 - without the UK present.
German Chancellor Angela Merkel and French President Francois Hollande said the migrant crisis was a key issue.
"We didn't dodge anything,"
Mr Hollande said.
"We decided that together we have to deal with the migration issue, while respecting the right to asylum."
Tension over migrants
There is a deep rift over the influx of migrants - including many refugees from Syria - as Slovakia, Hungary, the Czech Republic and Poland refuse to accept EU quotas for housing asylum seekers.
They are under pressure to accept quotas so that 160,000 refugees at camps in Greece and Italy can be relocated.
"We talked very concretely about what we are going to do to tackle issues like immigration,"
Mrs Merkel said. She spoke of an emerging "Bratislava spirit" of co-operation to tackle the toughest issues facing Europe.
"We will all need to make compromises,"
"We agreed that Europe finds itself in a critical situation after Brexit but that there are also other issues which we need to tackle together."