Germany, France and Spain would receive the most migrants under the Commission's latest plan.
The idea of using quotas to resettle those who have made it to Europe has caused controversy in some EU states.
The UK government says that it will not take part in such a system.
France, Spain, Hungary, Slovakia and Estonia have also all voiced concerns, and a final decision will be taken by EU governments after a vote by MEPs.
Denmark has the right to opt out of the plan while Ireland and the UK can decide whether they wish to opt in.
The plan applies to Syrian and Eritrean nationals who arrive in Italy or Greece after 15 April 2015. The Commission said it could also apply to Malta if it also faced a sudden influx of migrants.
This is in addition to moves announced earlier this month by the EU for a voluntary scheme to settle 20,000 refugees fleeing conflict who are currently living outside the EU.
Of the 40,000 migrants considered "in clear need of international protection", the Commission says:
Dimitris Avramopoulos, the home affairs commissioner, said it was not proposing "the fixing of quotas... for migration in general" and but it was "up to each member to decide how many refugees they will grant refugee status [to]".
"We only propose - and we insist on that - a fair distribution of a concrete number of migrants in clear need of international protection across the European Union," he said.
Countries would receive â‚¬6,000 (Â£4,250) for every person relocated on their territory under the latest proposal, the commission said.
More than 1,800 migrants have died in the Mediterranean in 2015 - a 20-fold increase on the same period in 2014.
Some 60,000 people have already tried to make the perilous crossing this year, the UN estimates.
Many are trying to escape conflict or poverty in countries such as Syria, Eritrea, Nigeria and Somalia.
The Commission said Italy and Greece were facing an exceptional level of migration, with Italy seeing a 277% rise in irregular border crossings from 2013 to 2014 and Greece seeing an increase of 153%.
UN chief Ban Ki-moon has also urged Europe to do more to help migrants, calling for search-and-rescue operations in the Mediterranean to be "further strengthened".
"I'm urging European leaders to address this issue in a more comprehensive way and a collective way," he said, adding that the "roots" of the problem in countries of origin must also be addressed.
But UK International Development Secretary Justine Greening has rejected the European Commission's idea of mandatory quotas because she said it could act as a "pull for more migrants".
French Prime Minister Manuel Valls said this month that asylum should be a right, not subject to quotas.
Earlier this month, EU ministers backed plans for a naval force to set up to combat smuggling gangs, if necessary by military force, inside Libyan territorial waters.

Knowsley Safari Park confirmed 18-year-old Kenya was attacked by females in the pride.
Despite the efforts of keepers to separate them, he sustained multiple injuries and was put down.
The park said it was "the most necessary and humane course of action" to avoid any further stress and suffering to Kenya.
In a statement, the park said the attack indicated his place as pride male was "no longer secure".
The statement said it was "natural behaviour" for a pride when the male is "no longer able to maintain the grace of the females".
Although there was no prior indication of an attack, staff were all prepared for when the "unpleasant event should arrive".
They added that no members of the public were in their vehicles at the time of the attack.
In the wild, male lions are in their prime between five and 10. Kenya, at 18, was "an old man".
He arrived at Knowsley from Longleat in 2003.
The European Commission has called on EU member states to take in 40,000 asylum seekers from Syria and Eritrea who land in Italy and Greece over the next two years.
[NEXT_CONCEPT]
An elderly lion who was attacked by lionesses at a Merseyside safari park has died as a result of his injuries.