The Japanese government stuck to its 21-year-old story today that American ships carrying nuclear weapons have been barred from Japan's waters and ports despite new disclosures by former officials that there never had been such an agreement.

Although the government's story was challenged on several sides, it nevertheless seemed determined to try to ride out the growing controversy.

The conflict burst into the open in a series of newspaper interviews that pitted the memories of former key officials against the version the government is clinging to.

Nuclear arms are a sensitive topic in this country that had two cities devastated by atomic bombs in World War II, and successive Japanese governments have avoided the issue of whether U.S. naval forces carry nuclear weapons. The Japenese also consider it extremely important that their politicians be seen as honest, and it would be a major embarrassment for a government in office to be suspected of lying about so sensitive an issue.

[Assocaited Press reported from Washington that Secretary of State Alexander M. Haig Jr. has canceled a visit to Japan scheduled for the second week of June. U.S. officials said the decision was made because Japan's new foreign minister would be away that week and had nothing to do with the problems plaguing U.S. Japanese relations.]

Meanwhile, socialist and antinuclear organizations laid plans for large-scale protests aimed against the U.S. Japanese mutual security treaty and attempting to force Prime Minister Zenko Suzuki's government to take responsibility for allegedly deceiving the public.

The controversy arose yesterday when former U.S. ambassador Edwin O. Reischauer disclosed in a newspaper interview that since 1960 an agreement had permitted nuclear armed American warships to dock routinely in Japanese ports and pass through Japanese waters.

Successive Japanese governments have insisted that such ships could not come into port without prior consultation between the two governments. In a new denial of Reischauer's story today, the government said again that prior consultation would be necessary and that no such consultation had ever been held.

However, several former officials were quoted in news stories today as saying that the understanding reached in 1960 did not require prior consultation for American naval vessels. They said that the agreement had been discussed only in terms of bringing nuclear weapons ashore for land basing and that warships were hardly discussed at all.

Takezo Shimoda, a former ambassador to the United States who was active in the 1960 negotiations, said that at the time the question of temporary docking or passing through Japan's waters "was outside the matter for prior consultation."

Members of Suzuki's Liberal Democratic Party said they expect the prime minister to survive by continuing to deny Reischauer's story.