They made the pledge on Monday at a summit in the French capital, Paris, aimed at reducing the numbers of people undertaking a dangerous journey along the so-called central Mediterranean route.
During the meeting, which was also attended by the head of Libya's UN-backed government and the presidents of Chad and Niger, they also said they would accept asylum claims from refugees who apply for protection while in Africa instead of their destination countries.
The leaders signed a plan on the proposal, though there were as yet few details on how it could work. A joint mission will be sent to Niger and Chad soon, they said in a statement after the mini-summit.
French President Emmanuel Macron, who hosted the summit, called it the most effective and far-reaching meeting in months.
"We must all act together - from the source countries to Europe and passing by the transit countries, especially Libya - to be efficient," he told reporters. "It’s a challenge as much for the EU as for the African Union."
In a joint statement, the four leaders acknowledged the need to initiate a process in Chad and Niger that would lead to the resettlement of "particularly vulnerable migrants" in Europe.
They announced the plan to carry out "protection missions" in the African nations in cooperation with the United Nations' refugee and migration agencies.
The process would allow refugees and migrants to immigrate legally to Europe if they are on an eligibility list provided by the UN refugee agency and registered with authorities in Niger and Chad.
The pre-asylum centres would receive European financing, according to a top French diplomat. The official, in keeping with French presidential policy, requested anonymity and would not provide details on the precise locations and procedures for the missions.
German Chancellor Angela Merkel said European countries must clearly define which asylum seekers have legitimate humanitarian needs and who are fleeing poverty.
She called it "very, very important" that the possibility of resettlement is coupled "with an end to illegal migration".
Merkel also said Europe also needs to "urgently" rethink its asylum system, which requires migrants to seek refugee status in the first country they reach. The requirement has put a huge burden on Greece and Italy, where waves of rickety boats carrying people have arrived in recent years.
The African leaders at the summit said fighting poverty must be a central part of any strategy, adding that human smugglers must be given legal ways of making money.
Niger's President Mahamadou Issoufou said poverty is what drives people to head to Europe and into trafficking, and that it is important "to find alternatives for the smugglers to leave criminal activity", such as commerce or farming.
"We are all committed to reducing the damage, the death of Africans in the desert, the death of Africans crossing the Mediterranean," Chad President Idriss Deby said.
"The fundamental problem will always remain development. We need resources," he added.
Helping Libya was also a key part of Monday's meetings, and Fayez al-Sarraj, the head of Libya's UN-backed government, asked for more support to fight people trafficking and monitor his country's southern border.
The seven leaders also discussed security cooperation before the Europeans held separate talks focused on European Union matters.
Meanwhile, the interior ministers from Libya, Chad, Niger and Mali, who were meeting with Italy's interior minister in Rome on Monday, said the Paris summit's agenda "can constitute the beginning of a new relationship between Europe and Africa".
The ministers also renewed a pledge to back peace accords among Libya's southern tribes and to stress the importance of backing Libya in the creation of a border guard force.
But groups that help migrants and refugees criticised attempts to stop migration at its source.
"We're extending the European border farther and farther away," Eva Ottavy, of the French charity Cimade, told AFP news agency.
On Monday, the Oxfam and ActionAid charities criticised Europe's leaders for what they called "fearmongering" over the migrant crisis.
They "continue to present migration as a threat rather than recognising its benefits", the groups said in a joint statement.
"They are playing into the hands of populist fearmongers who falsely claim that Europe is unable to cope with the arrival of people to its shores and who demonise search-and-rescue missions that save lives in the Mediterranean," it went on.
"Their short-term approach ignores the fact that Europe needs migrants," the statement said, adding: "Italy alone will need an estimated 1.6 million regular migrants over the next decade to sustain its welfare and pension schemes."
They called on the EU to "stop outsourcing border controls to Libya, trapping more and more people in a living hell" and urged governments not to make aid conditional on border management.
Some 125,000 people have crossed the Mediterranean by boat this year, according to UN figures, with the vast majority arriving in Italy before travelling on to other EU members. An estimated 2,400 have died en route.
The numbers arriving in Italy have fallen by around 50 percent in July and August compared with last year.