All Nippon Airways, Japan's second-largest carrier, said today it will buy 15 Boeing 767-300 wide-body jets and take an option for 10 more. Worth up to $1.8 billion, the deal will be Japan's largest single purchase of commercial aircraft from the United States.

Boeing beat out the European consortium Airbus Industrie in hard-fought competition to sell a new 300-seat jet to ANA, which operates 94 aircraft on domestic routes here and is expected to begin overseas service in 1986.

ANA said it chose Boeing's aircraft over the Europeans' A300-600 because of lower initial cost, easy conversion for use on foreign routes and compatibility with the existing fleet. ANA already operates 21 of an earlier version of the jet, the 767-200.

"There are many things in common in equipment, parts and training," an ANA announcement said today. "Therefore, our initial investment will be lower, and that favored the Boeing 767-300."

ANA and Japanese government officials denied there was any political factor in the decision, which comes as the United States is applying concerted pressure on Japan to correct an imbalance in trade. Japan is expected to have a record $50 billion trade surplus with the United States this year.

But one U.S. official here commented: "The fact that the Japanese have decided to buy American will certainly be very highly regarded in Washington."

The purchase also will bring more business for Japan. In terms of value, Japanese subcontractors produce about 15 percent of the 767, which Boeing is offering as a low-noise, high-fuel-efficient jet for the '80s and '90s. Japanese firms have no significant subcontracts for the Airbus.

ANA and Boeing are to sign final papers in February and at that time decide what engine the jets will use, choosing between models made by General Electric Co. and Pratt & Whitney.

ANA will pay $71 million for each plane. Delivery is to begin in the fall of 1987 and run for about nine years.

ANA is only the third carrier, after Delta Airlines Inc. and Japan Air Lines, to order the 767-300, which has yet to see commercial service. The first production model will be unveiled at Boeing's Seattle plant on Jan. 14. The twin-engined jet is a "stretch," or elongated, version of the 767-200 and, in the configuration ANA has ordered, seats 290 people.

Today's announcement marks the third time since 1979 that Airbus has lost out to Boeing in Japan. The European consortium, which links Britain, West Germany, France and Spain, has taken billions of dollars in business from the American company in other countries, but to date has sold only nine aircraft in Japan, to Toa Domestic Air Lines, commonly known as TDA. A 10th is scheduled to arrive next year.

In contrast, Boeing has sold close to 200 commercial planes here since the 1960s, making Japan its largest foreign market. Japan Air Lines alone has bought 55 of the 747 jumbos and is getting more.

ANA's new contract was hotly contested, with both sides attempting to sweeten the deal with favorable financing. Loans terms and interest rates are often the deciding factor in contests between the two companies' aircraft, which are widely rated as virtually identical in performance.

Joel Tucker, Boeing's director of international sales for East Asia and Australia, said Boeing would help assemble a commercial loan package. Details were not available, however. Airbus Industrie Tokyo representative Jacques Candau declined comment on the financing his side had offered and on the ANA decision. "We lost, and that's all," he said.

The planes will not qualify for a special $500 million aircraft credit program announced today by the Export-Import Bank of Japan as part of government efforts to encourage imports that will offset the trade surplus. The program marks the bank's first concessionary financing for planes, and expires at the end of March 1987.

Before ANA's decision, U.S. and European governments were reported to have unofficially entered the fray. According to the Japan Economic Journal, the country's leading financial newspaper, U.S. Trade Representative Clayton Yeutter plugged Boeing during a visit to Japan in September. A U.S. official here, however, said he was unaware of the United States ever raising the subject.

ANA is particularly sensitive to charges of back-room dealings. A decade ago, it was at the center of an influence-peddling scandal that ended with former prime minister Kakuei Tanaka being convicted of taking about $2 million in bribes from Lockheed to help secure the sale of its L1011 Tristar jumbos to ANA.

A Foreign Ministry official, noting this history, said the Japanese government had kept its hands off the Boeing-Airbus competition. "There's no joking about nongovernment intervention," he said. "All has been left to ANA."

Boeing officials here, meanwhile, today were celebrating a sale that ranks among the largest in the company's history. "All we wanted from the Japanese side was a level playing field," Tucker said.

The purchase comes as the Japanese government has taken initial steps to deregulate commercial aviation here, in which JAL, ANA and TDA are the only significant players. This month, it formally abolished JAL's monopoly over foreign routes. ANA is expected to begin service in the Pacific soon.