Six migrants died on 5 and 6 October trying to cross barbed-wire fences into the Spanish enclave of Melilla on Morocco's northern coast, the MAP news agency reported on Monday quoting the Interior Ministry.
Of those, four died after being shot in a "spray of gunfire by Moroccan security forces", the report said.
The other two are believed to have died after blood loss from wounds, MAP said, without specifying what caused the wounds.
The victims' names and nationalities are unknown, as they were not carrying identification.
Migrants from sub-Saharan Africa frequently use this kingdom as a transit point while trying to reach two Spanish enclaves in North Africa, fleeing poverty and hoping to start a new life in Europe.
Eleven people have died in recent weeks while trying to storm across the border.
The Interior Ministry said that some of the migrants who stormed the fence were armed with machetes or knives, requiring security forces to fire their weapons in "legitimate defence", the news agency reported.
Morocco has been criticised for
deporting illegal immigrants
The ministry said, however, it "deplored the tragic turn of events and expressed deep regret at the loss of human life", MAP reported.
Last week, a UN human-rights expert called for a transparent and independent investigation into the deaths.
The use of firearms by border guards is only permitted under international law if it is for self-defence or to protect others from death or serious injury, noted Jorge Bustamante, a UN expert on migrants rights.
After the shooting deaths, Morocco drew more criticism from human-rights groups for allegedly transporting hundreds of immigrants caught near Melilla to the Sahara desert and leaving them stranded there without food or water.
Morocco has denied this.
Now, the North African kingdom has begun a policy of sending would-be immigrants back to their country of origins by the planeload.