In a move welcomed by the Mexican government, Secretary of State Alexander M. Haig Jr. today delivered the final documents committing the United States to a treaty that would make Latin America a zone free of atomic weapons.

But Haig, here on a 24-hour visit, was much less likely to win Mexican support for his efforts to curb a buildup of conventional arms in Nicaragua, including the possible shipment of Mig fighter planes from the Soviet Union.

After the first private meeting here today between Haig and Mexican Foreign Minister Jorge Castaneda, Haig spokesman Dean Fischer said the session "reflected the common preoccupation of both countries with developments in Central America, particularly Nicaragua." Although the two countries do not have identical views, Fischer said, there was "a sense of mutual concern in the search for ways to deal with the problems of Nicaragua."

The Reagan administration has said it fears Nicaragua will become another Cuban-style armed camp spreading leftist revolution through Central America. But Mexico and some other nations fear that the United States will intervene militarily in Nicaragua and perhaps, in their view, add to the turmoil already flowing through that troubled region.

Mexican sources reported here that Castaneda told Haig once again of Mexico's opposition to any U.S. military intervention against Nicaragua and to public threats of such action.

Haig's visit here, while officially the result of an agreement to set up a routine bilateral forum for discussion of all policy issues between the two countries, also reflects the contradictions in current Mexican-American relations.

Greeted by Castaneda on his arrival here, Haig stressed the "remarkable" and "unprecedented" level of personal relations -- with four meetings alone this year between President Reagan and Mexican President Jose Lopez Portillo and three visits by Haig to Mexico.

Yet Mexico, an oil supplier and a key regional power in Latin America, also offers backing and low-cost oil to Nicaragua, supports leftist groups opposing the U.S.-backed government in El Salvador and maintains good relations with Cuba -- three countries that are primary targets of Reagan's foreign policy.

The ratification documents delivered here today by Haig mark completion of American participation in the Tlatelolco treaty, a multinational attempt begun in 1967 to ban nuclear weapons in Latin America.

The U.S. Senate last week ratified the treaty, under which the United States agrees "not to test, produce or deploy nuclear weapons in Latin America."

Haig said the measure also might serve as a good starting point for increased U.S.-Mexican cooperation in developing Mexico's fledging nuclear power program.

The treaty has been signed by all Latin American countries except Cuba, but Chile, Argentina and Brazil have not yet ratified it. Thus the treaty is hardly airtight at the moment.

Mexicans clearly are worried about the tough talk coming from Washington about Central America, and security was tight here for the Haig visit. But there were no major demonstrations today as once feared by U.S. officials, and protests by leftist groups yesterday were said to be smaller than anticipated.

Talking with reporters on his plane en route from Washington, Haig said he would use this visit to try and "clarify and bridge" the views between the two countries so that both governments at least "know where the other is coming from."

Asked if he would ask Mexico to use its influence in Nicaragua to halt what Haig describes as the "drift towards totalitarianism" in that country, Haig said, "that's a decision for them to make. It's not for us to come down here and wag a finger at their basic approach. But we do know that Mexico shares our basic values, the desire for peaceful change, and that's a pretty sound platform."

Reagan administration officials have said privately that they believe a number of Latin governments are becoming frightened by the developments in Nicaragua. Asked if he sensed such changes in the Mexican leadership, Haig said, "I think there have been legitimate expressions of concern from almost all of the regional governments about the trending in Nicaragua, and that is regardless of their basic approach to the problem.

"It is our hope," he continued, "that all the nations of the region will share our concern that the totalitarianism of Nicaragua raises a threat to . . . the prospects for peaceful social, economic change" in the region.

He said this was happening simultaneously with a huge influx of arms to Nicaragua that "far exceed" any need for their own defense.

Haig confirmed reports that Nicaraguan pilots were being trained in Eastern Europe to fly Soviet Migs. He said Migs had not arrived in Nicaragua but charged that there was "some evidence" Migs destined for Nicaragua may have arrived in Cuba. He also said, however, that those planes could be for "some other purpose."

Haig said Nicaragua was aiming at creating a 50,000-person Army and a militia of 200,000 -- a buildup he said would leave only Brazil and Cuba with larger forces in Latin America.

Soviet shipments of arms to Cuba so far this year, he claimed, amounted to approximately 60,000 tons, double that of last year.