In a statement, the ministry said it had asked Ecuador's ambassador to deliver a letter saying that the wall would hurt cross-border integration. It could also disrupt the flow of water in a canal that separates the two countries, raising flood risks for Peruvian cities, the ministry added.
Ecuador has said that the wall was necessary to stop smuggling.
Territorial disputes led to a three-year war between the two countries in the 1990s. Cross-border trade remains fluid, though passage of contraband is common, according to Peruvian police.