Prime Minister Giorgia Meloni said the shelters would have space for 3,000 people at a time when they open next spring. She said they could eventually handle 36,000 migrants a year.
The centres will be used for “speedy processing” of asylum applications from migrants rescued at sea, the Italian government said.
Italy will pay for the centres at the port of Shengjin and the Gjader area in north-western Albania, as it tries to bring down swelling numbers of migrants.
Children, pregnant women and “vulnerable people” will not be sent to the centres, Ms Meloni said after a meeting with Albanian counterpart Edi Rama.
Although Ms Meloni campaigned for a hard line on migration, more than 145,000 people have landed on Italian shores so far this year, compared with 88,000 in the same period last year.
Under EU rules, the nation where they first set foot must process their applications.
Mr Rama said Italy's geography, with the nation jutting southward into the Mediterranean, was “its curse. When you enter Italy, you enter the EU”.
The Italian government backs Albania's ambition to join the 27-member bloc.
“Lending a hand, in this case, means helping to manage a situation that everyone sees it is difficult for Italy,” Mr Rama said.
Ms Meloni said people “will stay in these centres for the time necessary to quickly process asylum applications and, if necessary, for repatriation”.
“I consider this as a truly European agreement, and I want to say that it shows that it is possible to work together on the management of migratory flows,” Ms Meloni said.
Ms Meloni's hard-right Brothers of Italy party has long called for asylum centres to be set up outside the EU, proposing, for example, North Africa, but no country from that region had accepted.
The main countries migrants have arrived from in Italy in 2023 were Guinea, Ivory Coast and Tunisia.
Non-EU member Britain hopes to send asylum seekers to Rwanda to deter them from crossing the English Channel, under an arrangement with the African country.
Nobody has been deported so far because of legal challenges that are currently before the UK's Supreme Court.
Meanwhile, Germany agreed on a tougher stance in late-night negotiations with the leaders of its 16 states, where authorities say they are overwhelmed by the number of asylum seekers from Syria, Afghanistan and other countries.
Chancellor Olaf Scholz's government agreed to look into the possibility of handling asylum claims in third countries, although it has been sceptical about whether this is possible.
It also agreed to pay local authorities €7,500 ($8,030) per refugee from next year and lengthen the time before people are eligible for benefits.